CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 1999
    Location
    Austria
    Posts
    53

    Openening a Outlook Mail Window

    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


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Openening a Outlook Mail Window

    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]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

  3. #3
    Join Date
    Nov 1999
    Location
    Austria
    Posts
    53

    Re: Openening a Outlook Mail Window

    thanks it works Great

    mfG Pueromane


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured