To create a rule with wildcards

Last reviewed on March 25, 2014

Outlook doesn’t support wildcards in rules, so you can’t use use a * or ? character for wildcards. Instead, just specify the string you want to match. For example, if you want to match anything with “foo” in the subject text, then any the following would cause the rule to fire:


Note that the Rules Wizard supports wildcarding for e-mail addresses. By using the “with specific words in the recipient’s address” and “with specific words in the sender’s address” conditions, you can set rules for everyone from a particular domain, for example. See Creating Rules that Apply to an Entire Domain for more information.

However, these address rules do not work for Exchange Server recipients since the Exchange server addresses do not show up in the message header. To apply a rule to addresses within your Exchange organization (or exclude them), use @ as the word in the address (or exclude messages with @ in the address). See Creating a Rule to Filter Blank Senders for more information.

Display names

While a partial word filter won’t work in all circumstances, you can use it to filter the display name of senders. For example, this rule will filter messages from Forum Administrator

rule test

Tip: Cancel the Check names dialog when adding the name to the people or group field:

Create a rule to filter partial display names

Run a Script rule

When a rule that looks for partial words isn’t working, you can use a run a script rule. This example shows how to filter for the Sender’s display name, but it can be used with any Outlook email field.

Sub CheckSpam(Item As Outlook.MailItem)
  If InStr(LCase(Item.SenderName), "pfizer") Then
  End If
End Sub

See Outlook’s Rules and Alerts: Run a Script for more information on using a run a script rule.

Written by

Diane Poremsky
A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

If the Post Coment button disappears, press your Tab key.