Shamil Salakhetdinov
shamil at users.mns.ru
Wed Nov 2 08:25:57 CST 2005
Hi All,
Could you please, anybody who has non-MS email clients, check that this code
popups your email client send mail window?
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
strAddr = "nobody at ghost.net"
strSubj = "Prepare e-mail message via ShellExecute"
strBody = "First line%0d%0aSecond line%0d%0aThird line..."
Call ShellExecute(0&, vbNullString, _
"mailto:" & strAddr & _
"?Subject=" & strSubj & _
"&body=" & strBody, _
vbNullString, vbNullString, vbNormalFocus)
End Sub
Thank you,
Shamil