GetSharedDefaultFolder Method

Applies To

NameSpace object.

Description

Returns a MAPIFolder object that represents the specified default folder for the specified user. This method is most useful in the delegation scenario, where one user has delegated access to another for one or more of their default folders (for example, their shared Calendar folder).

Syntax

expression.GetSharedDefaultFolder(RecipientObject, FolderTypeEnum)

expression An expression that returns a NameSpace object.

RecipientObject Required Recipient object. The owner of the folder. The Recipient object must be resolved.

FolderTypeEnum Required Long. The type of folder. Can be one of the following OlDefaultFolders constants: olFolderCalendar, olFolderContacts, olFolderDeletedItems, olFolderInbox, olFolderJournal, olFolderNotes, olFolderOutbox, olFolderSentMail, or olFolderTasks.

Example

This example resolves the Recipient object representing Kim Buhler, and then returns her shared default Contacts folder.

Set myRecipient = olNameSpace.CreateRecipient("Kim Buhler")
myRecipient.Resolve
If myRecipient.Resolved Then
    Set KimContactsFolder = _
        olNameSpace.GetSharedDefaultFolder _
        (myRecipient, olFolderContacts)
End If