Folders

This section provides sample tasks that involve folders. Folder objects represent the folder hierarchy where Microsoft Outlook items are stored. Examples of folders include the Calendar, Mail, and Deleted Items folders. In the Outlook Primary Interop Assembly (PIA), members of the Folder object are exposed as members of the MAPIFolder object.

In this section

Topic Description
Add a folder to the folder list Uses the Add(String, Object) method to add a folder to the Outlook folder list.
Enumerate folders Enumerates folders by iterating through a collection of folders.
Get a default folder and enumerate its subfolders Obtains a default folder in the user’s default store and enumerates its subfolders.
Get a folder based on its folder path Takes a folder path and obtains the associated folder.
Select a folder and display folder information Programmatically displays information about a folder that a user selects from a specified folder list.
Get the default message class of a folder Uses the DefaultMessageClass property to obtain the default message class of a folder.
Access solution-specific data stored as a hidden message in a folder Uses the StorageItem object to retrieve data that is stored as a hidden message of a specific message class in a folder.
Ensure that custom item properties are supported in folder-level queries Shows how to ensure that when you add a custom property to an item type, you also add the property to the folder so that you can query on that custom property at the folder level.

See also