How to: Enumerate Folders on All Stores
Outlook Developer Reference |
This topic shows a code sample that enumerates all folders on all stores for a session.
- The code sample begins by getting all the stores for the current session using the NameSpace.Stores property of the current session,
Application.Session
. - For each store of this session, it uses Store.GetRootFolder to obtain the folder at the root of the store.
- For the root folder of each store, it iteratively calls the
EnumerateFolders
procedure until it has visited and displayed the name of each folder in that tree.
Remarks
To run this code sample, place the code in the built-in ThisOutlookSession module. Run the EnumerateFoldersInStores
procedure:
|
See Also