_Store.GetRootFolder Method
Returns a Folder object representing the root-level folder of the Store. Read-only.
Namespace: Microsoft.Office.Interop.Outlook
Assembly: Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)
Syntax
'Declaration
<DispIdAttribute()> _
Function GetRootFolder As MAPIFolder
'Usage
Dim instance As _Store
Dim returnValue As MAPIFolder
returnValue = instance.GetRootFolder()
[DispIdAttribute()]
MAPIFolder GetRootFolder()
Return Value
Type: Microsoft.Office.Interop.Outlook.MAPIFolder
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 _NameSpace.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.
See Also
Reference
Microsoft.Office.Interop.Outlook Namespace