Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Outlook 2000 Folders using VBA

Status
Not open for further replies.

ttmac

Technical User
Aug 16, 2002
105
IE
How do I change the current folder using VBA?

I want to change from my current folder to the inbox folder when new mail is received. Microsofts newmail example steps through the active explorers and if none have the Inbox as the current folder the example launches a new instance of the application.

I want to have only one instance open and if the inbox is not the active Folder I want to automatically switch to it.

Any assistance would be appreciated.

Tom.
 
Set myNameSpace = Application.GetNamespace("MAPI")
Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
Here you will get inbox folder active.

let me know if it helps you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top