Send to Email recipient in VB
Hi, I need to do the same as Windows Explorer Send to....Email recipient command.
Do you now how?
For ex. I launch a html file using shell command as follow:
Shell "rundll32.exe url.dll,FileProtocolHandler file://" & archivo, vbMaximizedFocus
but I need to do the same to attach a file in new email message....
Thanks.
Re: Send to Email recipient in VB
VB Code:
Option Explicit
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
private sub MyMail()
ShellExecute 0, "open", "mailto:" & strMessage, "", "", SW_MINIMIZE
end sub
Where strMessage is your html Message with all the proper html markings for TO:, subject, and body.
HTH
Re: Send to Email recipient in VB
Also, it would be much easier to open the webpage using ShellExecute. Something like this:
ShellExecute 0, "open", "http://www.google.com", "", "", SW_MAXIMIZE
Re: Send to Email recipient in VB
Thanks, but what's up with the attachment?
Re: Send to Email recipient in VB
You mean how to include it automatically uppon shelling?
Re: Send to Email recipient in VB
This worked for me when I was trying to send email in vb
CLick Here