_Store.GetRootFolder Method

Definition

Returns a Folder object representing the root-level folder of the Store. Read-only.

public:
 Microsoft::Office::Interop::Outlook::MAPIFolder ^ GetRootFolder();
public Microsoft.Office.Interop.Outlook.MAPIFolder GetRootFolder ();
Public Function GetRootFolder () As MAPIFolder

Returns

A Folder object that represents the folder at the root of that Store.

Remarks

You can use the GetRootFolder method to enumerate the subfolders of the root folder of the Store. Unlike Folders which contains all folders for all stores in the current profile, Store.GetRootFolder.Folders allows you to enumerate all folders for a given Store object in the current profile.

The Parent property of the root folder of a store returns the string "Mapi".

The root folder for the Exchange Public Folder store is the folder Public Folders. This folder is returned by the call to Application.Session.GetDefaultFolder(olPublicFoldersAllPublicFolders).

GetRootFolder returns an error if the service provider does not support root folders.

Applies to