Last reviewed on October 26, 2013   —  22 Comments

There is a filter option available that works with Views, Search folders, Advanced Find, and Automatic formatting or Conditional formatting. It’s called Query Builder and it’s simple to enable and easy to use. To enable it, add the appropriate key called QueryBuilder to your registry.

where xx.0 equals your Outlook version number.

To use the QueryBuilder, select the QueryBuilder tab from the Filter dialog and select or enter the criteria. After adding two or more conditions, select a group and choose the AND or OR operator from the logical group menu. Create nested conditions by moving the criteria up or down.

Use the query builder to create filters

For example, QueryBuilder allows you to create one filter that looks for messages received today from Mary OR for messages received today which request a read receipt. Using the Advanced filter you needed two separate filter rules, one for each condition. QueryBuilder needs just one rule and looks like this:

messages received today
– OR
from Mary
request a read receipt

You’re probably wondering why QueryBuilder remains largely unknown when the ability to create OR filters is often requested. Apparently QueryBuilder can cause instability in Outlook. Your mileage may vary, but I’ve used it off and on since Outlook 2002 without a problem and it’s worth trying if you need to create filters using OR.

Don’t want to edit your registry? See Do it for me for reg files. Download then double click on the file to make the change to your registry.

Outlook 2013
Create key named: QueryBuilder

Outlook 2010
Create key named: QueryBuilder

Outlook 2007
Create key named: QueryBuilder

Outlook 2003
Create key named: QueryBuilder

Outlook 2002
Create key named: QueryBuilder

Do it for me

Click on the appropriate link to download a registry file (*.reg) containing the QueryBuilder key and add it to your registry. If you want to view the file before installing it, save it to your hard drive and open the *.reg file in Notepad. To install, double click on the file.

Outlook 2013 Outlook 2010 Outlook 2007
Outlook 2003 Outlook 2002

You do not need to close Outlook or restart it after adding the key to your registry.

Query Builder and From Addresses

The problem: You want to use Query Builder to create a Search folder that filters by email address, but Outlook’s Query Builder appears to ignore the email address and uses the display name instead. The only time it works as expected is when the email address is the display name.

The cause: The filter dialog has two From fields. The From field on the first tab uses the email address while the From field you use on the Advanced tab uses the display name. The Query Builder uses the same From field used by the Advanced tab.

The solution: Install a CFG to expose the email address field then use that field in your query. We have a custom CFG available for download along with installation instructions available at Adding Extended MAPI Fields to Outlook.


  1. Fabrice says


    I'm trying to create a query in order to view only non read emails but from 4 differents IMAP email folder.
    Even using the query builder I was not able to search through multiple folders.

    Thanks for your help



  2. KoolPal says


    I created the key as described here:
    Outlook 2010
    Create key named: QueryBuilder

    I am still unable to see the option in Search Folders. What am I doing wrong?

    • Diane Poremsky says

      It should show up without restarting outlook, but did you try restarting outlook? Did you use the ready to use reg file from the site or type it in?

  3. KoolPal says

    Thanks for the quick response Diane. I operate in an environment where regedit is blocked by admin.

    The IT admin came over and typed it in.

    I tried immediately after regedit was done as well as after restarting outlook & windows 7.

    What else could I check?

  4. KoolPal says

    Sorry was caught in daily humdrum of emails. I rechecked. All correctly typed.

    What else can I check / fix?

    Please help

    • Diane Poremsky says

      It sounds like everything should be working. I'm going to check it on VM and see if i can repro.

  5. KoolPal says

    If it helps, I am on Windows 7 Professional, SP1 on 64 bit OS
    My Outlook installation is: Version 14.0.6112.5000 (32-bit)
    Part of Office Professional Plus 2010

    I am not sure if this information can help you diagnose and help further.

  6. KoolPal says

    I had left a few replies with details of my Outlook and Windows Setup. The status shown was pending moderation.

    Did you get a chance to review those?

    • Diane Poremsky says

      No, not yet. Thursday is a deadline day for me and I only answer the easy questions on deadline day. :) I try to keep messages in the moderation queue so I can find them when I have the time to reply.

  7. Phil says

    How exactly would you create this condition?

    - AND
    messages received today
    - OR
    from Mary
    request a read receipt

    • Diane Poremsky says

      So you want to see all messages received today, that are either from mary or are a read receipt?

      To limit it to only read recipients, you need the unique part of message class (IPNRN) or the full message class: REPORT.IPM.Note.IPNRN. I didn't have any to filter on, or any mary's. :)

  8. roee says

    Hi, I'm using Outlook 2013 and the problem of using a filter based on sender's email (rather its name) still exists.
    Do you have any idea if this is something MS considers a bug and is going to fix?

    • Diane Poremsky says

      I don't think it will be fixed anytime soon (but I'd love to be wrong!) - they'd need to do some rewriting of the filters to make the change. If you use the From field on the General page, the address should work.

  9. Wayne Harropson says

    My LogicalGroup drop down is dead, therefore "no filter criteria specified".
    Query builder will be absolutely perfect for my needs once I can get the grayed out items in the dialog to take entries. The reg entries appear installed correctly for my Outlook 10 version. I I shut down and restarted outlook, I'll try system reboot next.

    • Diane PoremskyDiane Poremsky says

      If a reboot doesn't fix (i suspect it won't make a difference), please post a screenshot somewhere and post a link here. (You can post it at if you don't use OneDrive or similar service. )

    • Diane PoremskyDiane Poremsky says

      If you add 2 fields and conditions, the buttons on the right should be enabled.

Leave a Reply

Please post long or more complicated questions at OutlookForums by

If the Post Comment button disappears, press your Tab key.