Thursday, October 1, 2009

Two crude Outlook rule hacks


By Joe Dolittle

Reader Peter Harris asks an interesting question about rules:

I can't find a way to put an AND rather than OR condition within a single rule condition.
For example, I might want the subject line to contain 2 different words/phrases to satisfy the condition, but they won't necessarily be together.
In Outlook Express there's an options dialog which allows you to say "message matches ALL conditions" rather than "ANY" condition.
Is there a way to do this in Outlook?

Rules are always a bit funky in Outlook, and Outlook doesn't explicitly implement AND logic in rules. However, for the example Peter asked about, there is a way to hack it.

Let's say you wanted a rule that would trigger if "Microsoft Outlook" or "Microsoft Office Outlook" was in the subject line. You could set it up to implement as an OR function by simply adding both criteria to the subject match option in rules.

But let's say you wanted to be able to match for "Microsoft Outlook", "Microsoft Office Outlook" and anything else that might include both "Microsoft" and "Outlook" -- let's say "Microsoft Office 2010 Outlook". You can cheat.

Using the rules "Specific word in the subject" and "Specific word in the subject or body" rules, you can generate some basic AND logic, as shown in Figure A.


Here's a crude way to do it. (click for larger image)

Now, obviously, this also includes Outlook in the body of the message, so if the subject is "Microsoft announces Halo 4" and the body contains "Steve, this is really cool. If you want to play, reply to me with Outlook" the rule would trigger.

But like all good hacks, it's a hack.

Peter also asks if there's a way to exclude a message if there's a word in the subject. For example, he wants his rule to always fire unless the word "newsletter" is in the subject. He says, "I can't find a NOT option in Outlook".

Once again, this is doable, but crude. As Figure B shows, the way to do a NOT is to use the Exclude option. You can do this by applying the rule to every message (just hit Next on the first rules screen), and then run it "Except if the subject contains newsletter", as shown in Figure B.


You can use Exclude to provide crude NOT logic. (click for larger image)

So there you go. Two crude hacks for the price of one.