Enable Query Builder in any edition of Microsoft Outlook


To totally unlock this section you need to Log-in


Login

NOTE: you'll can download the needed registry keys to enable the Query Builder for Microsoft Outlook at the end of this article. Enjoy. :-)

In Microsoft Outlook, 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.

Many complex searches and filters can already be done on the Advanced tab of Advanced Find when searching for an item or creating a Search Folder or within the Filter section when creating a custom view.

However, you’ll find that when you specify multiple values for the same field, it will use the OR operator and when adding another field, it will use the AND operator. This sometimes leads to unexpected results or not being able to execute some queries.

Example

For instance, say that you want to find a specific email related to a certain project. Some emails you’ve already assigned the Project 1 category so you want those to be included in your search results either way. Then, in order to find the rest, you specify people you’ve worked with in the project and several words that are related to the project.

So this query requires:

  1. an OR operator when specifying the names (as they could be or from person A or from person B or from person C or to person A, or to Person B or to person C);
  2. an OR operator when specifying the words;
  3. an AND operator for the combination of persons and words;
  4. an OR operator between the project category and the combination of results specified at point 3.

You cannot do this with the options that you find on the Advanced tab.

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.

Enabling the Query Builder

In order to still achieve the desired results, you can enable the Query Builder which does allow you to control the AND and OR relation in your searches (yes, even nesting!). Enabling it needs to be done via the Windows Registry.

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

You will see Registry Editor dialog, start looking for (in this case we're working on Outlook 2010):

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.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

Now change the name of newly added key to QueryBuilder.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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 Advanced Find command. Now from left pane, select Home and hit New Group, new group will be added to Home tab, change its name to Advanced Search, and then click Add >> button to add Advanced Find command to newly created group. Click OK to close Outlook Options dialog.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

You will reach Advanced 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 Advanced Find dialog.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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.

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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

Enable Query Builder in any edition of Microsoft Outlook

Enable Query Builder in any edition of Microsoft Outlook

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.

Registry keys for Outlook

Outlook 2013

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook

Create key named: QueryBuilder

Outlook 2010

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook

Create key named: QueryBuilder

Outlook 2007

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook

Create key named: QueryBuilder

Outlook 2003

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook

Create key named: QueryBuilder

Outlook 2002

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook

Create key named: QueryBuilder

Download

NOTE: you have to be a registered user and log on HeelpBook to download the download attached to this article. Sorry.

[wpfilebase tag="file" id=144 /]