Show Sender’s Company Name in the Message List

For all my contacts (“clients” actually in my case), I’ve filled out the Company field on the Contact form. I’ve also made sure that the Company name is included in the contact’s Display Name.

My aim for this was that I could reveal the Company name directly in my message list so I could directly recognize which company the sender is from.

However, although I can add the Company field to my message list, the field remains blank. Also, my chosen display name for the contact seems to be ignored.

Why is this being ignored and more importantly; How can I achieve what I want?

Button CompanyThe information shown in your message list isn’t queried against your Contacts folder, it can only show properties of the message itself.

If it would query your Contacts folder for each and every item or would somehow hold an active link, creating the message list would be a slow process taking up quite a bit of resources and it would also slow down the Send/Receive process.

To still achieve what you want, we can make use of the e-mail address field and extract the domain name from it which for business contacts often is the same as the company name.

With a special field, you can add the sender’s company name to your message list.
With a special field, you can add the sender’s company name to your message list.

Step 1: Add Sender Address Custom Form Configuration File

As the e-mail address isn’t a default field for the message list, we need to make it available first. This can be done with the the Custom Form Configuration File from this guide: Show sender’s e-mail address as a column in message view

It is enough to install the form, you don’t actually have to add the address column to your view, unless displaying the full address is already enough for your needs.

Step 2: Create a Custom Field

To really filter out only the company name from the domain name, we need to define a Custom Field which modifies the retrieved email address value.

  1. Open the Columns section in your View Settings.
    • Simplified Ribbon
      View-> Current View-> View Settings…-> button: Columns…
    • Classic Ribbon
      View-> tab: View Settings-> button: Columns…
  2. Press: New Column…
  3. Name the column. For instance: Domain
  4. Set the type to: Formula
  5. Type or copy & paste the following formula:
    Mid([From E-mail Address],(InStr( [From E-mail Address] , "@" ) +1))

    Defining the new “Domain” column as a Formula.
    Defining the new “Domain” column as a Formula.

  6. Press OK.
  7. Optionally: Move the column up or down in your list of already selected columns.
  8. Press OK until you’ve returned back to your Mail folder.

Instead of address@domain.com, the column will now display: domain.com

Step 3: Change view to show 3 header lines

If you are using Compact View for your Message List, change the columns option to show 3 lines of the header instead of the default 2.

After adding the “Domain” column, set Compact Mode to 3 lines.
After adding the “Domain” column, set Compact Mode to 3 lines.

Optional: Further modifications of the formula

If you do not like to see the domain extension part (.com) of the domain name either, you can use the following formula instead:

Mid([From E-mail Address],(InStr([From E-mail Address],"@")+1),Len([From E-mail Address])-(InStr([From E-mail Address],"@")+1)-(Len([From E-mail Address])-InStrRev([From E-mail Address],".")))

To customize the formula if you’ve already defined and added the column:

  1. Go back to the View Settings dialog, but instead of the Columns… button, press the Format Columns… button.
  2. Select the “Domain” column.
  3. Modify the Formula value directly or press the … button for a larger editor.
  4. OK yourself out of the opened dialogs to return to your Tasks folder.

Instead of address@domain.com, the column will now display: domain

You can customize the formula afterwards via Format Columns.
You can customize the formula afterwards via Format Columns.

Remove a double extension such as .co.uk

If you live in a country which often uses double extensions (like .co.uk), you can filter them out with the following formula.

IIf(Right([From E-mail Address],6)=".co.uk",Mid([From E-mail Address],(InStr([From E-mail Address],"@")+1),Len([From E-mail Address])-InStr([From E-mail Address],"@")-6),Mid([From E-mail Address],(InStr([From E-mail Address],"@")+1),Len([From E-mail Address])-(InStr([From E-mail Address],"@")+1)-(Len([From E-mail Address])-InStrRev([From E-mail Address],"."))))

Instead of address@domain.co.uk, the column will now display: domain

Show the company name in all uppercase or lowercase

To show the name in all uppercase or lowercase you can make another small modification:

Uppercase: UCase(formula)
Lowercase: LCase(formula)

With the above formula, mails from billg@microsoft.com will be tagged with MICROSOFT.
With the above formula, mails from billg@microsoft.com will be tagged with MICROSOFT.

MAPILab
Use "4PM76A8" to get a discount when ordering!