1. Home
  2. MS Office
  3. Outlook 2010 advanced search query builder

Outlook 2010 Advanced Search [Query Builder]

In Outlook 2010 when you are overwhelmed by loads of emails and your inbox is piled up with a lot of spam content, then it becomes difficult to search for a specific emails. Query Builder is a hidden feature available in Outlook that defines more complex and confine criteria to perform advance search. It has a intuitive interface which let users find the content by applying different conditions. This post elaborates how to integrate Query Builder and the core use of it.

Note: Integration of Query Builder requires modifying the registry, before you start off with it, make sure that you understand how to restore the registry and backup the concerned registry files to prevent occurring of any erratic response.

First you need to close Outlook 2010 if it is running. From taskbar click Windows Start Orb button, type regedit and hit Enter.

You will see Registry Editor dialog, start looking for:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook

Right-click the Outlook Folder, and from New menu click Key, this will add a new key to the outlook folder.

new key 1

Now Change the name of newly added key to QueryBuilder.

querybuilder 1

Close the Registry Editor dialog. Now launch Outlook 2010.

Go to File menu, click Options, and in left pane click Customize Ribbon, In right pane select All Commands from Choose commands from drop-down options and look for Advance Find command. Now from left pane, select Home and hit New Group, new group will be added to Home tab, change its name to Advance Search, and then click Add >> button to add Advance Find command to newly created group. Click OK to close Outlook Options dialog.

advance find

Now Switch to Home tab, you will see the newly added command button, click Advance Find to open the Advance search options.

newly added 1

You will reach Advance Field dialog, now if you are already acquaint with this feature, then you will notice that one new tab with the name of Query Builder is added in to Advance Find dialog.

advance find dialog 1

Switch to Query Builder tab to find anything you want, by applying orthodox query rules. There are loads of options under Define Field Criteria for searching.

For Instance, we need to find all the mails from either YouTube or Microsoft, for this we need to build a query. First Click Field drop-down button under Define More Criteria.

query dialog 1

Upon click, you will see hundreds of search criteria options, from All Mails Fields menu, click From.

from mail' 1

Under Define More Criteria, select a condition, and from Value enter Text that you want to find, then click Add to List.

add to list 1

Once added, repeat the procedure to add another string that you want to search and click Add to List.

In our case we want to find all the mails received either from Microsoft or YouTube. So we will add Microsoft and YouTube as search strings. From Logical Group drop-down button select desired option (AND, OR ). We will select OR from the options.

and or explained 1

From the right side of the window, click Find Now button to start searching the string with applied condition

click find now 1

In the bottom pane, it yields desired search results with applied conditions.

final find now

Extra Note: We need to add the registry key since it will add the Query Builder tab inside the Advanced Find dialog. By default, Query Builder tab is not present inside Advanced Find.

You may also interested in how to send large files in Outlook 2010.

24 Comments

  1. The Query Builder also shows up under the Conditional Formatting feature (tab under Conditions). So you can easily use the logic to do something like color code emails based on advanced conditions. For example, If I am not in the To line, AND I am not in the CC line, then color the msg line grey. That way both conditions must be true for the rule to work. You can do some things with the Rule wizard, but not that (it has limited conditions).
    Still useful 8 years later, thanks!

  2. Thanks! Now if it only were possible to add certain columns aka “fields” to the Advanced Find Results view (for example, the column “FROM”, gosh darn it), and have that view saved as default for the Advanced Find results list view.

    Thanks heaps already for any information if that is possible.

  3. You can spend eons doing this foolishness. Or you can use a Macintosh and follow one simple step to search a particular mail folder. It will take about 3 seconds.This is a perfect example of why PC and Microsoft is utter crap, and always will be.

    • Single-folder searches are usually simple in Microsoft as well, just sort and filter and visually scan for any messages you need. The challenge arises with a search of *multiple* folders.

  4. Like many others thanks for tyhe tip… This has greatly reduced my search time in aiding fellow employees in the search for old mail in extreamly large folders.. and also in finding and removing old and unwanted mail…. But tell me this… Why is this hidden? seams to me this would be a widely publicized added key feature, it can only help.

  5. Thank you so much for posting this – I would never have been able to figure out without these very detailed steps. What I can’t understand is why this would not have been part of the default software.

  6. I’m tearing my hair out trying to do a pretty simple ‘advanced’ search:

    “Find all emails Sent between 15 March 2012 and 16 April 2012 with Attachments”

    I cannot find Attachments from the Field dropdown list to add it as a criteria to my Search Query – where is this? what am I doing wrong?? Any help greatly appreciated – thank you.

    • Don’t know about Query Builder but if you follow Paratester’s post you can search all sent with attachements – then sort the results by date

    • Thanks for your reply – I ended up using Custom Search Folders to do pretty much that. I still find it odd that Attachments isn’t a criteria listed in the Query Builder. Oh well.

  7. Thanks for this post. What a great facility for building a query without actually knowing anything about the resulting syntax. At first glance after enabling and testing the feature as instructed, it appears there is no way to reveal the full query string produced by the builder. It would be nice to see the resulting query string, and thereby become more enlightened, and be able to sometime generate query strings without the aid of the builder. Is there a way to show the string generated by the builder?

    Thanks very much

  8. Is there another registry entry which will allow us to set the default Advanced Find to search subfolders?

  9. I added the registry key (exacly as described!) and I’m not getting the Query Builder tab 🙁

    Could there be group policy or something else overriding the registry key? Any other ideas?

  10. To the commenters: This isn’t about getting to Advanced Search, this is about adding Query Builder to Advanced Search. Getting to Advanced Search is done by clicking in the normal Search box thus initiating the Search Ribbon, clicking the Search Tools dropdown and selecting Advanced Search.

  11. Thank you! Thank you!

    Microsoft is unbelievable when it comes to changing their UI in strange ways. Search and AdvancedFind have been front and center since beginning of Outlook.

    Then they Hide them in the Registry settings… Forcing new 2010 users into download the crappy Windows Desktop search.

  12. Great post! Only M$ could think removing advanced search ability was a great new “feature”. I am going to send this link to our entire IS department. Thanks again!

  13. Ah…go to view/view settings/filter.

    Still no idea why the criteria button is greyed out though. :/

  14. I’ve enabled the QueryBuilder in the registry and can see the advanced search tab as you describe it. However, this feature seems to only let you do “one time” advanced searches. What I want to do is modify the “Unread or Ror FollowUp” search folder to exclude searching in certain folders. This used to work great in Outlook 2007 but is not working in Outlook 2010. Basically, i can’t figure out how to enable the query builder function to this search folder.

    When I click on the folder, then go to the Folder tab on the ribbon I see a button called “customize this search folder”. When I click on that there is a line called “Select “Criteria” to change what items this Search folder contains”. The Criteria folder is greyed out.

    Any idea why?

  15. Thanks for the steps… The Outlook search indeed is frankly said 'not good'. Funny though, that Microsoft is hiding this feature, and thereby weakens it's own advanced search. I'll give it one more try at work… On my private system, however, I'm very satisfied with this search tool Lookeen. Advanced search that is : )

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.