Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to create an Outlook rule that matches two non-adjacent words in the subject line. It must match both words (AND), not one or the other. If I add the two words as one entry it treats them as a phrase rather than two distinct words, and if I add them as separate entries, it places an "OR" between them. Creating two rules doesn't work either, as they behave just like the "OR" case.

Is there any way to say, in effect, "Apply this rule to emails matching ALL of the following words."?

share|improve this question
As a work-around, I can add one word to "with xxx in the subject" and the other word to "with xxx in the subject or body". This isn't reliable, however, so I'd still like to know if a better solution exists. – Marcelo Cantos Sep 10 '09 at 1:44
Sigh. I thought I had hit on something when I used the "with xxx in the subject" and "with xxx in the subject or body." It worked perfectly with one rule, not at all with any other rule. And then when I modified the rule it was working for, it stopped working on that one too... – Doug R. Oct 21 '15 at 18:16
up vote 11 down vote accepted

i'm afraid, the answer is no.

You can't change the logic from the Rules Wizard itself. It's preset for "usual" requests. I tested a few different wizard options for you though.

If you key in the whole phrase (instead of just one word at a time) as one submission (e.g. "How do you get there") it will filter any messages that comes through with all the words in that order. That helps (maybe!) but if you get a message that has, "how do you ALWAYS get there" it won't activate the filter so it might not meet your needs. If you already know the difference between the AND and OR controller then you probably already know that this won't help you ;)

As you've already discovered, if you drop each word in separately, it will use the "or" controller and you'll filter out a lot more messages than you want.

You CAN import custom scripts for your Outlook rules but you have to use VBScript and you have to craft the rules in VBScript for applications, not just the editor. It's proprietary to Microsoft Corp.

There is an expanding knowledge base article from Microsoft

It's got examples of code you can use but you have to draft it from VBScript for applications as mentioned above.

You might consider a third party filter.


(this question has been asked many times and the conclusion is always the same)

share|improve this answer
Wow, I had no idea you could write filters in VBA! That's perfect for me, thanks. – Marcelo Cantos Sep 10 '09 at 5:00

I found a way around this. If you use the rule "with specific words in the subject" and then also use the rule "with specific words in the subject or body" then you can link two phrases together that are both in the subject with the "and" operator.

share|improve this answer
The OP mentioned this exact workaround in a comment six years ago. – Scott Oct 15 '15 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .