Modifica

Condividi tramite


_Store.GetDefaultFolder(OlDefaultFolders) Method

Definition

Returns a MAPIFolder object that represents the default folder in the store and that is of the type specified by the FolderType argument.

public:
 Microsoft::Office::Interop::Outlook::MAPIFolder ^ GetDefaultFolder(Microsoft::Office::Interop::Outlook::OlDefaultFolders FolderType);
public Microsoft.Office.Interop.Outlook.MAPIFolder GetDefaultFolder (Microsoft.Office.Interop.Outlook.OlDefaultFolders FolderType);
Public Function GetDefaultFolder (FolderType As OlDefaultFolders) As MAPIFolder

Parameters

FolderType
OlDefaultFolders

Specifies the type of the requested default folder.

Returns

Returns a Folder object that represents the default folder of the requested type. If the default folder of the requested type does not exist, GetDefaultFolder returns Nothing (a null reference (Nothing in Visual Basic) in C#).

Remarks

This method is similar to the GetDefaultFolder(OlDefaultFolders) method of the NameSpace object. The difference is that this method gets the default folder on the delivery store that is associated with the account, whereas GetDefaultFolder of the NameSpace object returns the default folder on the default store for the current profile.

One example of when GetDefaultFolder returns Nothing (a null reference (Nothing in Visual Basic) in C#) is when olFolderManagedEmail is specified as the FolderType but the Managed Folders group has not been deployed.

Applies to