Microsoft Office Tutorials and References
In Depth Information
Referencing the MAPI Namespace
In some of the code examples in this and following chapters, you’ll see code that explicitly gets the
MAPI namespace. In other code, particularly short snippets, it will be assumed that this has already
been done.
TABLE 24.1
Constants for the GetDefaultFolder Method’s foldertype Argument
Constant
Folder Containing
olFolderCalendar
Calendar items
olFolderContacts
Contacts
olFolderDeletedItems
Items that have been deleted
olFolderDrafts
Drafts of incompleted items
olFolderInbox
Received email messages
olFolderJournal
Journal entries
olFolderNotes
Note entries
olFolderOutbox
Email messages waiting to be sent
olFolderSentMail
Email messages that have been sent
olFolderTasks
Task entries
Referencing User-Created Folders
Folders that the user has created are not default Outlook folders and references to them are
obtained from the Folders collection. Because folders can themselves be organized in a hierarchy,
things are arranged as follows:
n Each top-level folder is a member of the NameSpace object’s Folders collection.
n Each of these top-level folders has its own Folders collection, which contains any
subfolders that the folder contains.
n Each folder in turn has its own Folders collection.
User-created folders are identified by name, which is obtained from the Folder object’s name
property. To get a reference to a folder, assuming that you do not know exactly where it is located,
you must look through all folders until you either find it or run out of places to look. This
Search JabSto ::




Custom Search