Click to See Complete Forum and Search --> : Openening a Outlook Mail Window


pueromane
November 17th, 1999, 06:38 AM
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

Aaron Young
November 17th, 1999, 03:17 PM
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:adyoung@win.bright.net?Subject=It Works!!?Body=Well, Well, Well, What do you know..%0A%0A..It Really Does Work!", "", "", 1
End Sub





Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com

pueromane
November 18th, 1999, 06:22 AM
thanks it works Great

mfG Pueromane