Share via


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)

Syntax

'Declaration
Public Enumeration OlSearchScope
'Usage
Dim instance As OlSearchScope
public enum OlSearchScope

Members

Member name Description
olSearchScopeCurrentFolder The search scope will be only the folder represented by _Explorer.CurrentFolder.
olSearchScopeAllFolders The 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.
olSearchScopeAllOutlookItems The search scope is all Outlook items in all folders in stores that have been selected for search.
olSearchScopeSubfolders The search scope is the folder represented by 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.

See Also

Reference

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Use Instant Search to Search All Folders and All Stores for a Phrase in the Subject

How to: Search and Obtain Items in an Aggregated View