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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation to open a nondefault folder in Outlook from Access

Status
Not open for further replies.

LeonePak

Technical User
Jan 18, 2003
4
US
Hello,
I searched MS web site and found

objItem = Session.GetDefaultFolder(olFolderCalendar)

to open the default Calendar folder from Access.

Is there a way to open a new calendar folder I created in Outlook from Access?


Many Thanks.
 
Hi,

This is the code I use to open a public contacts folder, you should hopefully be able to adapt it to what you need:

Code:
Set ol = Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set objAllFolders = olns.Folders("Public Folders")
Set objPublicFolders = objAllFolders.Folders("All Public Folders")
Set objFolder = objPublicFolders.Folders("External Contacts")

Sharon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top