Edit

Share via


NameSpaceClass.GetDefaultFolder(OlDefaultFolders) Method

Definition

This is a .NET class or a member of a .NET class created when processing a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this class only when you have to access an earlier event in this class that has been subsequently extended in a later version of Outlook. Otherwise, use the .NET interface derived from the COM coclass. For information about the .NET interface, see NameSpace.

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

Parameters

FolderType
OlDefaultFolders

Returns

Implements

Remarks

If the default folder of the requested type does not exist, depending on the type, Outlook may create and return the folder, or may raise an error. For example, if olFolderManagedEmail is specified as the FolderType but the Managed Folders group has not been deployed, then Outlook raises an error.

Applies to