• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

How to invoke Outlook?

Could any one give me some code about to invoke outlook using vb, that NOT using the shell as which requires absolute path.
1 Solution
go to menu Project/References
Add "Microsoft Outlook Object Library"

to invoke Outlook during your program use:

    Set myOlApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)

Outlook will be opened showing you Inbox.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now