Manipulating Folders and Items
Folders in Outlook are represented by the MAPIFolder object. You can obtain a reference to the default folder for a built-in Outlook item by using the NameSpace object's GetDefaultFolder method. The syntax is
obj.GetDefaultFolder(itemtype)
Obj is a reference to the NameSpace object, and item is a constant identifying the type of item whose default folder you want to retrieve. Possible settings for this argument are described in Table 10.1.
Constant | Item |
---|---|
OlFolderCalendar | Calendar |
OlFolderContacts | Contacts (the address book) |
OlFolderDeletedItems | Items that have been deleted |
OlFolderDrafts | Drafts of incompleted items |
OlFolderInbox | Received e-mail messages ... |
Get Office® XP Development with VBA now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.