Share via


Store.GetDefaultFolder Method (Outlook)

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

Version Information

Version Added: Outlook 2010

Syntax

expression .GetDefaultFolder(FolderType)

expression A variable that represents a Store object.

Parameters

Name

Required/Optional

Data Type

Description

FolderType

Required

OlDefaultFolders

Specifies the type of the requested default folder.

Return Value

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 Null (Nothing in Visual Basic).

Remarks

This method is similar to the GetDefaultFolder 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 NameSpace.GetDefaultFolder returns the default folder on the default store for the current profile.

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

See Also

Concepts

Store Object

Store Object Members