Exclude specific folders in a mailbox wide search
I’m sorting my emails into multiple folders and therefor frequently use the Search feature with the scope set to “Current Mailbox”, “All Mailboxes” or even “All Outlook Items”.
However, this also returns some unwanted results from folders which are basically always irrelevant to me.
For instance, I always want to exclude the following folders from my search results: Drafts, Deleted Items, Junk E-mail, RSS Subscriptions, Newsletters, Social Media Updates and some more.
Is there any way to apply such a search filter without complicating my search query?
There are a couple of approaches will will deed work better than specifying the “folderpath” query command for each search that you want to execute.
- Apply a permanent filter to your Message View
- Define a new “Search Filter” view
- Create a Search Folder with a folder scope and filter
Option 1: Apply a permanent filter to your Message View
The easiest and most automated way to go would be to apply a filter to your view. You’d only have to do this once and all future searches will automatically get filtered.
- Select your Inbox folder.
- Open the View settings.
- Outlook 2007
View-> Arrange By-> Custom… - Outlook 2010 and Outlook 2013
tab View-> View Settings…
- Outlook 2007
- Click on: Filter…
- Select the Advanced tab.
- Enter the following criteria to exclude a specific folder:
- Field: In Folder
- Condition: doesn’t contain
- Value: <folder name>
- Press “Add to List”.
- Repeat step 5 and 6 for each folder you want to exclude.
- To exclude RSS items from your Search results, add the following criteria:
- Field: Message Class
- Condition: doesn’t contain
- Value: ipm.Post
- Press “Add to List”.
- Press OK until all open dialogs are closed.
A View filter allows you to always exclude specific items from your Search Results.
Note: By default the Deleted Items and Junk E-mail folder are already excluded from the Search results. You can configure this in File-> Options-> Search (Outlook 2010 and Outlook 2013) or Tools-> Options…-> Search Options… (Outlook 2007).
Option 2: Define a new “Search Filter” view
A bit more practical might be to create a special “Search Filter” view which you can apply with a few additional clicks.
This would give you the flexibility turn the filter on or off and also prevents that you’ll see a “Filter Applied” message in the Status Bar at all times. Additionally, it will be less likely that the View will get altered or reset.
- Open the Manage View dialog.
- Outlook 2007
View-> Arrange By-> Current View-> Define Views… - Outlook 2010 and Outlook 2013
tab View-> Change View-> Manage Views…
- Outlook 2007
- Click on: New…
- In the Create a New View select the following:
- Name of new view: Search Filter
- Type of view: Table
- Can be used on: All Mail and Post folders
- Click OK.
- Define the Filter as explained above in Option 1 step 5.
You can apply the “Search Filter” View to your search results via: View-> Change View or the View Selector in the Advanced Toolbar of Outlook 2007 (View-> Toolbars-> Advanced).
A separate Search Filter view can be a more flexible approach.
Extra tip: In Outlook 2010 and Outlook 2013, you can add the Change View button to your Quick Access Toolbar by right clicking on it and choose “Add to Quick Access Toolbar”. This will save you from switching to the View tab.
You can also customize the Ribbon to add that button to the Search tab: File-> Options-> Customize Ribbon
Option 3: Create a Search Folder with a folder scope and filter
Yet another way to go would be to create a Search Folder with only those folders selected which you want to search in. You’d then perform your search query from that Search Folder with the scope set to “Current Folder” instead.
- Create a new Search Folder.
- Outlook 2007
File-> New-> Search Folder - Outlook 2010 and Outlook 2013
tab Folder-> New Search Folder
- Outlook 2007
- Scroll down in the New Search Folder dialog and select: Create a custom Search Folder
- Click on: Choose…
- Name the folder. For instance: Filtered Search
- Click on: Browse…
- Remove the selection at the top of your mailbox.
Select all the top-level folders which you want to include in you search. For instance, the Inbox folder and the Sent Items folder.
- Click OK to return to the Custom Search Folder dialog.
- Click on: Criteria
- Select the Advanced tab.
- Add the criteria for each subfolder which you would like to exclude as explained above in Option 1 step 5.
For instance, if your Newsletter folder is a subfolder of the Inbox folder which you have selected in step 7, then you need to add a filter for it. If you created the Newsletters folder as a top-level folder (same level as Inbox, Sent Items, etc… folder), then you don’t have to include a filter for it since you didn’t select it in step 7. - Press OK until all open dialogs are closed.