GetDefaultFolder Method
Applies To
NameSpace object.
Description
Returns a MAPIFolder object that represents the default folder of the requested type for the current profile (for example, obtaining the default Calendar folder for the user who is currently logged on).
Syntax
expression.GetDefaultFolder(FolderTypeEnum)
expression An expression that returns a NameSpace object.
FolderTypeEnum Required Long. The type of default folder to return. Can be one of the following OlDefaultFolders constants: olFolderCalendar, olFolderContacts, olFolderDeletedItems, olFolderInbox, olFolderJournal, olFolderNotes, olFolderOutbox, olFolderSentMail, or olFolderTasks.
Example
This example obtains the default Calendar folder for the current user.
set myCalendar = olNameSpace.GetDefaultFolder(olFolderCalendar)