MartyConnelly
martyconnelly at shaw.ca
Wed Nov 2 19:23:57 CST 2005
I get return value = 5 Shamil Salakhetdinov wrote: >Marty, > >May I ask you to run this code below, which shows ShellExecute return value >in a message box? >When ShellExecute succeed this return value = 42. >What it's in your case? > >Private Declare Function ShellExecute Lib "shell32.dll" _ > Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation _ > As String, ByVal lpFile As String, ByVal lpParameters As String, _ > ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long > >Public Sub TestSendMail() >Dim strAddr As String >Dim strSubj As String >Dim strBody As String >Dim lngRet As Long > strAddr = "nobody at ghost.net" > strSubj = "Prepare e-mail message via ShellExecute" > strBody = "First line%0d%0aSecond line%0d%0aThird line..." > lngRet = ShellExecute(0&, vbNullString, _ > "mailto:" & strAddr & _ > "?Subject=" & strSubj & _ > "&body=" & strBody, _ > vbNullString, vbNullString, vbNormalFocus) > MsgBox "ShellExecute return value = " & lngRet, _ > vbInformation + vbOKOnly, "Test SE" >End Sub > >Thank you, >Shamil > >----- Original Message ----- >From: "MartyConnelly" <martyconnelly at shaw.ca> >To: "Access Developers discussion and problem solving" ><accessd at databaseadvisors.com> >Sent: Wednesday, November 02, 2005 10:30 PM >Subject: Re: [AccessD] ShellExecute to send short e-mailvia non-MS >emailclients... > > > > >>Mine doesn't work with Netscape Composer >>But I know why. >>The Shell command should return this error but you wont see it >>"Could not perform this operation because the default mail client is >>not properly installed." >>The reason is this registry entry below points to Outlook rather than >>Netscape. >> >>HKEY_CLASSES_ROOT\mailto\shell\open\command >> >>I installed Netscape then full Office 2003 >>I decided to get rid of Outlook 2003 but didn't reinstall Netscape 7.1 >>so the registry key wasn't changed back. >>One of these days I may do a full install of Netscape 8.0 >> >> >> ><<< tail trimmed>>> > > > -- Marty Connelly Victoria, B.C. Canada