CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Location
    CA
    Posts
    83

    Opening up default email browser to a certain email

    I want to open a user's default email app to a certain email, however I am unsure of how to do this. Let's say my program see's a windows email document (something with an .eml extension) how can I open up the default browser with the email showing.
    Any help would be greatly appreciated.
    Thanks


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

    Re: Opening up default email browser to a certain email

    Try using the ShellExecute API, ie.
    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", "C:\Email.eml", "", "", 1
    End Sub



    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

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