OlSearchScope enumeration

Specifies the scope in terms of folders for the search.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

public enum OlSearchScope

Member nameDescription
olSearchScopeCurrentFolderThe search scope will be only the folder represented by _Explorer.CurrentFolder.
olSearchScopeAllFoldersThe search scope will be across all folders that have the folder type of the current folder (MAPIFolder.DefaultItemType) and all stores that have been selected for search in the In Folder drop down menu.
olSearchScopeAllOutlookItemsThe search scope is all Outlook items in all folders in stores that have been selected for search.
olSearchScopeSubfoldersThe search scope is the folder represented by CurrentFolder and its subfolders.
olSearchScopeCurrentStoreThe search scope is the store for the current folder, which contains the item displayed in the active explorer.

You can select stores to search in the Locations to Search menu by clicking Search Tools in the Options group of the Search contextual tab in the Microsoft Office Fluent ribbon.

By default, search does not include the Deleted Items folder. To search the Deleted Items folder, set that folder as your current folder and search by olSearchScopeCurrentFolder.