Tip 842: Natural language filters

Anyone who reads my tips and newsletters knows one of my favorite Outlook features is date shortcuts and natural language capabilities. Most date fields accept shortcuts or phrases (like a "week before Christmas") and converts to the proper date.

Another of my favorite features is Filters (used with Advanced find, Search folders, Automatic formatting and Views). The Advanced tab on the filter dialog gives you many filtering options and you can use natural language tricks with them. Filtering has a few idiosyncrasies, like the From field on the General tab is not the same as the From field on the advanced tab and OR operator is not supported. But otherwise, it's full of potential and you can use some of the natural language tricks with it.

We had this question recently: “In the task pane I want to customize a view to show tasks due in the next 21 days. Looking at the "next 7 days" option I tried changing the sql to %next21days("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040″)% but this just gives me an error. How do I make a filter for next 21 days?”

Ah… this calls for the use of one of my favorite Outlook features: natural language.

Rather than trying to edit the SQL (this specific example won’t work because there is not a next21days filter in Outlook to call up), create your own filter using the Advanced tab.

Select the Due Date field, choose on or before (to include overdue tasks) then type “21 days” in the value field (without the quotes, of course).

If you want to limit it to current tasks, choose Between as the condition and type “now and 21 days”.

Another person asked how to create a search folder for all messages older than 45 days. Using dynamic dates, so it shows items older than 45 days next week or next month.

Easy: use "ago" as in "Received on or before 45 days ago". This should always return the correct set of messages and changes daily.

For more on natural language, see

Time and Date Shortcuts

Published Mar 7 2011