Share your Outlook calendars, contacts, emails and tasks
in real-time without Exchange Server.
CodeTwo Public Folders

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?

Search Filter Results buttonThere 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.

  1. Select your Inbox folder.
  2. Open the View settings.
    • Outlook 2007
      View-> Arrange By-> Custom…
    • Outlook 2010 and Outlook 2013
      tab View-> View Settings…
  3. Click on: Filter…
  4. Select the Advanced tab.
  5. Enter the following criteria to exclude a specific folder:
    • Field: In Folder
    • Condition: doesn’t contain
    • Value: <folder name>
  6. Press “Add to List”.
  7. Repeat step 5 and 6 for each folder you want to exclude.
  8. To exclude RSS items from your Search results, add the following criteria:
    • Field: Message Class
    • Condition: doesn’t contain
    • Value: ipm.Post
  9. Press “Add to List”.
  10. Press OK until all open dialogs are closed.

A View filter allows you to always exclude specific items from your Search Results.
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.

  1. 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…
  2. Click on: New…
  3. 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
  4. Click OK.
  5. 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.
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.

  1. Create a new Search Folder.
    • Outlook 2007
      File-> New-> Search Folder
    • Outlook 2010 and Outlook 2013
      tab Folder-> New Search Folder
  2. Scroll down in the New Search Folder dialog and select: Create a custom Search Folder
  3. Click on: Choose…
  4. Name the folder. For instance: Filtered Search
  5. Click on: Browse…
  6. Remove the selection at the top of your mailbox.
  7. Select all the top-level folders which you want to include in you search. For instance, the Inbox folder and the Sent Items folder.

    New Search Folders - Select Folders - Inbox, Sent Items - Search subfolders

  8. Click OK to return to the Custom Search Folder dialog.
  9. Click on: Criteria
  10. Select the Advanced tab.
  11. 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.
  12. Press OK until all open dialogs are closed.


MAPILab
Use "4PM76A8" to get a discount when ordering!