My Outlook is connected to an Exchange account that accepts emails for multiple domains.  When I open up the emails, Outlook always displays my name in the To field, but doesn’t show which email (i.e. which domain) the mail was actually sent to.

I decided that manually checking the mail headers for this information was a dumb way to do things, so I wrote a little macro to automate this little task.  Hopefully some of you out there will find it useful.

Installation Instructions

  1. Press Alt+F11
  2. On the left hand side, expand the tree until you see ThisOutlookSession.  Make sure ThisOutlookSession is highlighted.
  3. Paste the code from below
  4. Close the Visual Basic window
  5. Attach the new macro to a toolbar item.  The way to do this varies with your version of Outlook.  For example, in Outlook 2007:
    1. Open any email
    2. Press the down arrow on the right side of the quick access toolbar
    3. Select “More Commands”
    4. In the “Choose Commands From” dropdown, select “Macros”
    5. Add the macro to the right hand side
    6. (Optional) Change the icon by highlighting the macro and selecting Modify.
  6. You can add the macro either to the “view email” screen as I explained above, or to the toolbar of the main inbox screen.



Added Dec 17: To ensure the macro isn’t blocked by the Outlook macro security settings, follow the instructions in this article to sign your own macros.