<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Andrew Delin's WebLog : Outlook</title><link>http://blogs.msdn.com/andrewdelin/archive/tags/Outlook/default.aspx</link><description>Tags: Outlook</description><dc:language>en-AU</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Outlook SQL DASL syntax - an update</title><link>http://blogs.msdn.com/andrewdelin/archive/2005/08/08/448882.aspx</link><pubDate>Mon, 08 Aug 2005 09:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:448882</guid><dc:creator>andrewdelin</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/andrewdelin/comments/448882.aspx</comments><wfw:commentRss>http://blogs.msdn.com/andrewdelin/commentrss.aspx?PostID=448882</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana&gt;Here's an &lt;STRONG&gt;update&lt;/STRONG&gt; to my previous blog entry on &lt;a href="http://blogs.msdn.com/andrewdelin/archive/2005/05/11/416312.aspx"&gt;Doing more with Outlook filter and SQL DASL syntax&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;I had some great feedback from my previous posting, there is obviously a need for more information about how to "do stuff" with Outlook filters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Special thanks to &lt;STRONG&gt;Patrick&lt;/STRONG&gt; for a very useful message, which showed me&amp;nbsp;how to use dynamic dates in Outlook filter queries. Previously I thought this was impossible! Patrick's trick (:o) is to use the &lt;STRONG&gt;today(S)&lt;/STRONG&gt; function with a parameter in seconds (S). The parameter gives a positive or negative offset from today and can be used to check the Due Date of tasks (or any other date test you like).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Here is Patrick's example which he uses on the Tasks folder:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;(&lt;BR&gt;&amp;nbsp;("&lt;/FONT&gt;&lt;/STRONG&gt;&lt;A href="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/811c000b"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/811c000b&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" = 0)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;AND&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;(NOT("&lt;/FONT&gt;&lt;/STRONG&gt;&lt;A href="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" IS NULL))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;AND&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;("&lt;/FONT&gt;&lt;/STRONG&gt;&lt;A href="http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" &amp;lt;= today(864000))&lt;BR&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;When applied to a task folder, this shows 'not completed' tasks that have a Due Date set in the next 10 days from today.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;This same technique should be useful for filtering on received date (etc) on email folders and others.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;STRONG&gt;Here's another tip&lt;/STRONG&gt;. Finding articles about Outlook Filter programming is tricky, but if you search for one of the following using &lt;/FONT&gt;&lt;A href="http://search.msn.com/"&gt;&lt;FONT face=Verdana&gt;MSN Search&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt; or Google, you will find several articles to check:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://search.msn.com/results.aspx?q=81050040"&gt;&lt;FONT face=Verdana&gt;http://search.msn.com/results.aspx?q=81050040&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://search.msn.com/results.aspx?q=811c000b"&gt;&lt;FONT face=Verdana&gt;http://search.msn.com/results.aspx?q=811c000b&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;These numbers come from the XML schema for the Outlook SQL syntax. Sometimes using a very specific identifier in this way can deliver accurate hits.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;My previous blog entry is here (&lt;/FONT&gt;&lt;a href="http://blogs.msdn.com/andrewdelin/archive/2005/05/11/416312.aspx"&gt;&lt;STRONG&gt;&lt;FONT face=Verdana&gt;Doing more with Outlook filter and SQL DASL syntax&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;FONT face=Verdana&gt;).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;If you try any of these ideas, please be sure to test the results thoroughly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Verdana&gt;-AD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;A href="http://www.technorati.com/profile/andrewdelin"&gt;Technorati profile&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;/FONT&gt;&lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;FONT face=Verdana&gt;http://www.microsoft.com/info/cpyright.htm&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=448882" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/andrewdelin/archive/tags/Outlook/default.aspx">Outlook</category></item><item><title>Doing more with Outlook filter and SQL DASL syntax</title><link>http://blogs.msdn.com/andrewdelin/archive/2005/05/11/416312.aspx</link><pubDate>Tue, 10 May 2005 16:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:416312</guid><dc:creator>andrewdelin</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/andrewdelin/comments/416312.aspx</comments><wfw:commentRss>http://blogs.msdn.com/andrewdelin/commentrss.aspx?PostID=416312</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Tahoma&gt;When I returned from an overseas trip earlier this year I needed to hack through a pile of emails that had accumulated. So I explored the Outlook filter search syntax (DASL) to see what could be achieved.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;(I am using Outlook 2003. I know some of this works with previous versions of Outlook.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;Firstly&lt;/STRONG&gt;, I recommend you add the [Filter...] button to a toolbar in Outlook. To do this, right-mouse-click on an empty area of the toolbar area at the top of Outlook, and select Customize from the menu. Pick the Commands tab and then select View in the Categories list. On the right, scroll down the Commands list until you see 'Filter' and then drag this entry up, up and away to a toolbar spot where you'd like it. You should now have a Filter button in your toolbar at the top of Outlook. You can close the Customize dialog.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;The Filter dialog is a somewhat hidden but powerful tool for finding all kinds of Outlook items. It is organised as four tabs: Messages, More Choices, Advanced and SQL. I recommend you play with this dialog if it's not familiar to you. When you apply a Filter on a folder, you will see a small legend above your email (on the right) saying 'Filter Applied' - a hint that not all items are being shown! You use the Clear All button in the Filter dialog to remove the filter so you can see everything again.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;I prefer to use the Advanced and SQL tabs of the Filter dialog because you can establish very specific queries that meet your needs. You will need to check 'Edit these criteria directly' to enter SQL queries. Switch to the SQL tab and try the following.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Tahoma&gt;Examples&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;To find email from a specific person (for example,&amp;nbsp;your manager), try this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; "urn:schemas:httpmail:fromname" LIKE '%Gerard O''Driscoll%'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Note the use of double ' which escapes the apostrophe in the name.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;To find all those Declined, Accepted and Tentative meeting responses, try this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; NOT "&lt;/FONT&gt;&lt;/STRONG&gt;&lt;A href="http://schemas.microsoft.com/mapi/proptag/0x001a001e"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/proptag/0x001a001e&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" = 'IPM.Note'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This finds stuff that isn't email. I found this useful on both Sent Items as well as Inbox.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;To find items that weren't sent directly to me, try this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT face="Courier New"&gt;NOT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("urn:schemas:httpmail:displayto" LIKE '%Andrew Delin%'&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR "urn:schemas:httpmail:displaycc" LIKE '%Andrew Delin%')&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This shows items where I am not on the To: line nor the Cc: line.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;To show items that you haven't read:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT face="Courier New"&gt;"urn:schemas:httpmail:read" = 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;You either haven't read these items, or you have marked them Unread again.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This appears to find mail that came from outside Microsoft:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; NOT "urn:schemas:httpmail:fromemail" LIKE '%microsoft%'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;You will need to change the company name in this filter for your own details, and test &lt;EM&gt;thoroughly&lt;/EM&gt;. It may not behave the same way.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This seems to find internal mail (from within Microsoft) which wasn't addressed to me:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; "urn:schemas:httpmail:fromemail" LIKE '%microsoft%'&lt;BR&gt;&amp;nbsp; AND NOT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("urn:schemas:httpmail:displayto" LIKE '%Andrew Delin%'&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR "urn:schemas:httpmail:displaycc" LIKE '%Andrew Delin%')&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Note I am checking both To and Cc addresses. To try this, you'll need to substitute your company name in the first clause. And test that it works.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;It would be nice to find emails that have attachments. BUT:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; "urn:schemas:httpmail:hasattachment" = 1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;-this DOESN'T&amp;nbsp;work the way you expect, because it seems&amp;nbsp;in-line pictures embedded in certain email formats are considered attachments &lt;STRONG&gt;:o(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Looking for items with normal or low priority:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000&gt;&lt;STRONG&gt;&amp;nbsp; "urn:schemas:httpmail:importance" &amp;lt;= 1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Items with no flag set:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;&amp;nbsp; &lt;FONT face="Courier New"&gt;NOT "urn:schemas:httpmail:messageflag" &amp;gt; 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Take care with flags, because it appears more than one attribute composes the email flag functionality. You can for example test for specific color flags being set; this tests for Purple flagged items:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/mapi/proptag/0x10950003"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/proptag/0x10950003&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" = 1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;And this looks for NO color flag being set:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;NOT "&lt;/STRONG&gt;&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/mapi/proptag/0x10950003"&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/proptag/0x10950003&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;" &amp;gt; 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Beware, because I found that&amp;nbsp; "NOT ... &amp;gt; 0"&amp;nbsp; is not the same as&amp;nbsp; "= 0". With the latter, you won't get the list of unflagged items you might expect.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Email sent to one of the groups (distribution lists, DLs) which I belong to:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;"urn:schemas:httpmail:displayto" LIKE '%Australia Consulting%'&lt;BR&gt;&amp;nbsp; OR&lt;BR&gt;&amp;nbsp; "urn:schemas:httpmail:displaycc" LIKE '%Australia Consulting%'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;This tests both the To: and Cc: address fields. Note this is the long name of the group, not the short alias name (8 characters). You could easily add more tests to make a filter that shows 'emails to Australian groups I belong to'.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;To find email items you have replied to, you might attempt a field query like "Tracking Status equals Replied" which produces this syntax in the SQL tab:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New"&gt;"&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/mapi/id/{0006200B-0000-0000-C000-000000000046}/88090003"&gt;&lt;FONT face="Courier New"&gt;http://schemas.microsoft.com/mapi/id/{0006200B-0000-0000-C000-000000000046}/88090003&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Courier New"&gt;" = 7&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;BUT I found this DOESN'T work because email tracking is usually disabled between Outlook and Exchange, to reduce sync overhead (this was the feature where Outlook recorded that you had replied to individual items). Instead, a reasonable proxy for this is to look for Inbox items which contain your name in the body of the mail (when you reply, the mail client inserts something like&amp;nbsp; From: Andrew Delin&amp;nbsp; in the body):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt; "urn:schemas:httpmail:textdescription" LIKE '%Andrew Delin%'&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Tahoma&gt;Putting it all together&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Unread items received last month, not sent directly to me:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt; NOT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("urn:schemas:httpmail:displayto" LIKE '%Andrew Delin%'&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR "urn:schemas:httpmail:displaycc" LIKE '%Andrew Delin%')&lt;BR&gt;&amp;nbsp; AND&lt;BR&gt;&amp;nbsp; %lastmonth("urn:schemas:httpmail:datereceived")%&lt;BR&gt;&amp;nbsp; AND&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "urn:schemas:httpmail:read" = 0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Non-urgent Inbox mail from inside Microsoft which is 3+ months old, not flagged, not addressed to me, and which is either 'unread' or which I didn't reply to (proxy):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;STRONG&gt;&amp;nbsp; "urn:schemas:httpmail:fromemail" LIKE '%microsoft%'&lt;BR&gt;&amp;nbsp; AND&lt;BR&gt;&amp;nbsp; "urn:schemas:httpmail:importance" &amp;lt;= 1&lt;BR&gt;&amp;nbsp; AND&lt;BR&gt;&amp;nbsp; "urn:schemas:httpmail:datereceived" &amp;lt; '1/02/2005 12:00 AM'&lt;BR&gt;&amp;nbsp; AND NOT "urn:schemas:httpmail:messageflag" &amp;gt; 0&lt;BR&gt;&amp;nbsp; AND NOT&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("urn:schemas:httpmail:displayto" LIKE '%Andrew Delin%'&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR "urn:schemas:httpmail:displaycc" LIKE '%Andrew Delin%')&lt;BR&gt;&amp;nbsp; AND (&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "urn:schemas:httpmail:read" = 0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (NOT "urn:schemas:httpmail:textdescription" LIKE '%Andrew Delin%')&lt;/STRONG&gt;&lt;BR&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;If you want to try this, update the date constant (see datereceived) to something appropriate, as well as changing %microsoft% to your company and removing my name! Please test the result thoroughly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Tahoma&gt;Views&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Once you have some queries you like, you can define these so they're available in your Views drop-down list. To create a new view, use the View menu / Arrange By / Current View / Define Views / New button. Choose 'Table' and then you'll see several buttons to setup the View, including Filter - which you'll recognise as the same dialog from above. Enter your carefully crafted syntax and the filter will activate whenever you select this view on your folder. I have defined views for my main group memberships and external email so I can quickly filter my Inbox.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Tahoma&gt;Other notes&lt;/FONT&gt;&lt;/H2&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;Be patient with the Outlook Filter dialog. Sometimes you need to use Clear All then OK to get the full list of items to appear in your Inbox, before trying another filter query.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;I found it was important to test my filter expressions carefully. Sometimes 'NOT' doesn't produce the opposite list of what you're seeing, and some fields aren't populated the way you expect (for example, there are several flag attributes - see above; there are also a number of similar-sounding email address fields to check and you may not get the results you first guess at).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;A syntax reference for using DASL through the Outlook filter isn't easily found. I tried looking in the Exchange SDKs and while I got a list of attributes, it wasn't very Outlook-friendly. For example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_urn_content-classes_message.asp"&gt;&lt;FONT face=Tahoma&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_exch2k_urn_content-classes_message.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;There's also a list of Outlook IPM message types here, if you want to search for specific mail item types (eg Meeting requests):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&amp;nbsp; &lt;/FONT&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olfm11/html/rerefaboutitemtypesmessageclasses_HV01044391.asp"&gt;&lt;FONT face=Tahoma&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/olfm11/html/rerefaboutitemtypesmessageclasses_HV01044391.asp&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;I did find some bits in Thomas Rizzo's book on pages 197 and 701 ("Programming Microsoft Outlook and Microsoft Exchange 2003").&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;If you want to do date dynamic date calculations in Outlook filters, you will need to use the today(S) function with a positive or negative offset in seconds. &lt;STRONG&gt;&lt;a href="http://blogs.msdn.com/andrewdelin/archive/2005/08/08/448882.aspx"&gt;I have written about this here (thanks Patrick!)&lt;/A&gt;&lt;/STRONG&gt;. Otherwise there is a fixed set of date functions like '%lastmonth' or you can enter literal dates such as &amp;lt;= '1/1/2005 12:00 AM'. Here is a list of these fixed date functions - for the syntax, just use the Advanced tab in the Outlook Filter dialog, and add the mail field called 'Received' (Outlook will display something like 'Received yesterday|today|tomorrow|in the last 7 days ...' etc. If you switch to the SQL tab, it will show you the syntax to use.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp; %yesterday&lt;BR&gt;&amp;nbsp; %today&lt;BR&gt;&amp;nbsp; %tomorrow&lt;BR&gt;&amp;nbsp; %last7days&lt;BR&gt;&amp;nbsp; %next7days&lt;BR&gt;&amp;nbsp; %lastweek&lt;BR&gt;&amp;nbsp; %thisweek&lt;BR&gt;&amp;nbsp; %nextweek&lt;BR&gt;&amp;nbsp; %lastmonth&lt;BR&gt;&amp;nbsp; %thismonth&lt;BR&gt;&amp;nbsp; %nextmonth&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;I hope the above helps. If you try any of the above ideas, please be sure to test the results thoroughly.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;/STRONG&gt;&lt;/FONT&gt;&lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;&lt;FONT face=Tahoma&gt;&lt;STRONG&gt;http://www.microsoft.com/info/cpyright.htm&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=416312" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/andrewdelin/archive/tags/Outlook/default.aspx">Outlook</category></item></channel></rss>