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!

I need the index numbers of the Outlook Folders

Status
Not open for further replies.

Linebacker

Programmer
Mar 14, 2002
8
DE
Hi All,

I need to call VBA methods from an external tool. Therefor I need an index of the Outlook default Folders. I found the indexnumbers of 2 Folders (FolderInbox = 6, FolderTasks = 13), but I can't find the other ones. If anybody could help me out, I'd truly appreciate it.

LB
 
i went to outlook VBA and selected help and typed in "folder numbers" and this came up.

Using the MAPIFolder Object

Use Folders(index), where index is the name or index number, to return a single MAPIFolder object from a NameSpace object or another MAPIFolder object.

There is a set of folders within an Outlook data store that support the default functionality of Outlook. Use GetDefaultFolder(index), where index is one of the OlDefaultFolders constants to return one of the default Outlook folders in the Outlook NameSpace object. The OlDefaultFolders constants are olFolderCalendar (9), olFolderContacts (10), olFolderDeletedItems (3), olFolderDrafts (16), olFolderInbox (6), olFolderJournal (11), olFolderNotes (12), olFolderOutbox (4), olFolderSentMail (5), and olFolderTasks (13).

hope it helps.

Thanks Rob.[yoda]
 
Thx,

it sure did. I actually found some MSDN CDs after a long search in the depths of our archive wich should answer such wuestions in the future.


LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top