Milleniux
Nov 23rd, 1999, 05:34 PM
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.
Mark Sreeves
Nov 23rd, 1999, 05:53 PM
stick this in a module...
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
Mark.Sreeves@Softlab.co.uk
A BMW Group Company
Milleniux
Nov 23rd, 1999, 06:45 PM
Cheers Mark ... great stuff.
works excellently
M.