I need an Outlook Search Folder that finds e-mail by searching the sender or recipient's actual e-mail address.
It's possible to configure a Search Folder to find email based on the Sender's actual e-mail address (see below). However, it's not possible to expose the actual e-mail address for the To, Cc, or Bcc fields. An explanation of why can be found at the end of this answer.
Configure Search Folder to Search on Sender's Actual E-mail Address
Note: These instructions are written for Office 2013, but the solution should work for at least Outlook 2007 and later.
Step A: Add a Custom "Sender's Actual Address" Field to Outlook Using a Form
These steps create a custom form that adds a new field to Outlook with the sender's actual email address:
Save the following custom Outlook form configuration with the file name
DisplayName=From Email Address
Comment=This forms is used to expose a sender's actual email address.
Type=30 ; 001E = 30 in decimal
NmidInteger=0xc1f ; 0C1F
DisplayName=From E-mail Address
FromEmailAddress.cfg to your language-specific Microsoft Office's Forms folder, located at:
C:\Program Files (x86)\Microsoft Office\OfficeXX\FORMS\<LanguageID>
<OfficeXX> is the Office folder including the version number (e.g.
Office15 for Office 2013)
<LanguageID> is your 4-digit language ID (e.g.
1033 for English).
Note: Administrative rights are required to save files to this folder.
Note: Office may be installed in
C:\Program Files if you have a 32-bit OS, or a 64-bit version of Office on a 64-bit OS.
In Outlook, on the File tab of the ribbon click Options.
- Click Advanced in the left pane, then in the Developers group click Custom Forms...
- In the Options dialog, click Manage Forms...
- In the Forms Manager dialog, click Install...
- Navigate to the folder where you saved the
FromEmailAddress.cfg file, select it, then click Open.
- Click OK on the Form Properties window that opens, then Close, followed by OK twice to close Outlook Options.
Credit to this slipstick.com article for information on how to expose a sender's actual e-mail address as a field.
Step B: Use the Custom "From Email Address" Field in a Search Folder's Criteria
These steps leverage the newly created field as criteria for a Search Folder:
- On the Advanced tab of the Search Folder Criteria dialog box, click the Field drop-down, then click Forms...
- In the left pane select From Email Address, click Add -> then Close.
- Click the Field drop-down again, point to From Email Address then click From E-mail Address on the fly-out menu.
- Specify the desired Condition and Value, then click Add to List, then OK to close the dialog.
The Actual To, Cc, and Bcc E-Mail Addresses Can't Be Used as Criteria for Search Folders...
A thorough search of Outlook's other pre-defined fields, the MAPI fields available through Outlook's Object Model, and a review of properties exposed by OutlookSpy reveals there are no fields that expose these e-mail addresses as text. There is the PR_MESSAGE_RECIPIENTS property, but unfortunately this is an object that contains each recipient as a separate item. Accessed natively (using the Custom Form method above) returns nothing.
...With One Almost Useless Exception
Using the VBA from this slipstick.com article I was able to add a User Defined Field (UDF) to messages that contained a single string containing the recipient e-mail addresses in the format
email@example.com, firstname.lastname@example.org. However, when selecting a UDF in the Search Folder Advanced Criteria's Field list, only UDFs defined in the Inbox are available:
If messages with the custom fields populated exist in the Inbox, they are found by the Search Folder. However, such messages located in other folders are not included in the results. Unless your Search Folder is only interested in the Inbox, this is rather useless.
Reasons why UDFs don't work in the criteria of a Search Folder are documented here, here and here.
The Pre-Defined Fields Are Still the "Best" Solution
When it comes to the To:, Cc:, and Bcc: fields, it's still best to use the pre-defined fields in your Search Folder criteria and hope the actual e-mail address is part of the Display Name (which it often is).