Creating Microsoft Outlook Mail Rule with Wildcards

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
74,140
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a Mail Rule in Microsoft Outlook. The records I want to select/target have a VERY specific Subject line. The Subject line will look like this:
Demand DMNDxxxxxxx has been assigned to the IT Support Group

The part in red is a number that will always be changing/different.

So I want to target emails that have this exact format in the Subject line. If it is a response, so it begins with "RE:", it should NOT be picked up by this mail rule.
I need to target emails that start with:
Demand DMND
and end with:
has been assigned to the IT Support Group

If we could use wild cards, I think this would be easier, but I am not seeing that option.
Also, everything I see in the mail rule options for Subject line seems to have "contains", and I don't see a "start with" option.
Nor do I see a "does not contain option".
My concern is that would then also capture emails with this in the subject line,
RE: Demand DMNDxxxxxxx has been assigned to the IT Support Group
which I do not want.

Does anyone know the best way to accomplish this?

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
This could be done with a macro, but what action do you want the rule to take?
 
Upvote 0
I am going to be deleting the emails.
I will also include the sender in the criteria - I only want to delete emails from a specific email address. But that part is easy enough and I can do that myself.
 
Upvote 0
You can't use wildcards, but you could add an exception for emails with RE: in the subject
 
Upvote 0
You can't use wildcards, but you could add an exception for emails with RE: in the subject
So, I could do something like?

contains "Demand DMND"
AND
contains "has been assigned to the IT Support Group"
AND
does not contain "RE:"
 
Upvote 0
Yes, I think that is probably your simplest option. I'd still probably move them to a folder for checking rather than actually deleting them as part of the rule.
 
Upvote 0
Yes, I think that is probably your simplest option. I'd still probably move them to a folder for checking rather than actually deleting them as part of the rule.
OK, that sounds good, only I am not seeing how to do that when looking at all the options under the Rules Wizard.

When looking for "Subject line contains", it looks like if you want to add multiple phrases, it treats it like an "OR" when I need it to treat it like an "AND".
How do I get it to only include emails whose Subject lines contain BOTH those phrases?

And I am not seeing any sort of "does not contain" option for the "RE:" part.
 
Upvote 0
The exceptions part is, I think, the third step of the wizard.

I had forgotten there isn't an And option there. Would it work to use the 'subject or body' search as well for the 'Demand DMND' part? (I figure that is less likely to be in the body)?

Failing that, you could perhaps use two separate rules. Have one that assigns a category based on the first phrase being in the subject (but does nothing else). Then have your other rule test for the second phrase and the specific category.
 
Upvote 0
Solution
Thanks Rory. That worked. I went with checking part of the Subject line, and then checking the Body, and adding the Exception.
I tested it, and it works as desired!
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top