Please could someone tell me how I can use the mailto command from VB to automatically open or restore the default mailbox and open a new message box.
I have tried using a shell command but this doesnt seem to work.
any ideas.
Cheers
M.
Printable View
Please could someone tell me how I can use the mailto command from VB to automatically open or restore the default mailbox and open a new message box.
I have tried using a shell command but this doesnt seem to work.
any ideas.
Cheers
M.
stick this in a module...
Code:Public Const email = "Whoever@wherever..."
Public 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 Const SW_SHOWNORMAL = 1
Public Sub sendemail()
Dim Success As Long
Success = ShellExecute(0&, vbNullString, "mailto:" & email, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Cheers Mark ... great stuff.
works excellently
M.