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.
expression A variable that represents a 'Store' object.
|FolderType||Required||OlDefaultFolders||Specifies the type of the requested default folder.|
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).
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.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.