I'm looking for a way to launch the default e-mail client using a simple command button.
Any tips on how to achieve this?
Printable View
I'm looking for a way to launch the default e-mail client using a simple command button.
Any tips on how to achieve this?
You will need to use the ShellExecute API:
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
Call it like this:
ShellExecute me.hwnd, "OPEN", "mailto:yourmail","",App.path,1
Hey-If you are trying to open a new message in the default email client to be sent to a certain address,there is a simple code to do this:
Shell "Start Mailto:[email protected]"
This takes no special declarations, etc.
Hope this helps!
CarlosTheJackal