Partager via


OlSearchScope Enumeration

Specifies the scope in terms of folders for the search.

Version Information

Version Added: Outlook 2007

Name

Value

Description

olSearchScopeAllFolders

1

The search scope is across all folders that have the same folder type as the current folder (Folder.DefaultItemType), and all stores that have been selected for search.

olSearchScopeAllOutlookItems

2

The search scope is all Outlook items in all folders in stores that have been selected for search.

olSearchScopeCurrentFolder

0

The search scope is the folder represented by Explorer.CurrentFolder, and only that folder.

olSearchScopeSubfolders

3

The search scope is the folder represented by Explorer.CurrentFolder and its subfolders.

Remarks

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.