I want to open an Outlook Mail Window with default values, so that the user can change them and then send the Mail. I have a code to send the Mail without opening the Window, but how can I open the Window.
Please help.
mfG Pueromane
Printable View
I want to open an Outlook Mail Window with default values, so that the user can change them and then send the Mail. I have a code to send the Mail without opening the Window, but how can I open the Window.
Please help.
mfG Pueromane
If Outlook is the Default Mail Client, Try the ShellExecute API, eg.
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
private Sub Command1_Click()
ShellExecute 0&, "OPEN", "Mailto:[email protected]?Subject=It Works!!?Body=Well, Well, Well, What do you know..%0A%0A..It Really Does Work!", "", "", 1
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
thanks it works Great
mfG Pueromane