Inserting Outlook 2013 Contact Addresses into Envelopes

Last reviewed on June 1, 2014

A couple of people noticed a problem addressing envelopes with Outlook contacts that are stored in Exchange server:

When clicking on Address Book icon in Envelopes in Word 2013, contact information is pulled in from a public folder with the company name on the same row as the individual contact name. What do I edit to correct this?

John Smith ABC Corporation
123 Jones Road
Jacksonville, FL 32202

Envelope wizard

When you insert an address into Word using the envelope wizard, the name field that it uses is not the Full Name field, it's the Subject field. (Yes, contacts have a Subject field.)

In older versions of Outlook and Exchange this wasn't a problem, as the subject field was the full name field. The behavior changed because the function that calculated contact properties, EXCDO.DLL, was removed from Exchange 2010/2013, as it was no longer needed by Exchange. The way the properties are calculated now adds the company name.

You can create a custom address layout that uses the first and last name fields. Instructions are at Inserting Addresses into Word Documents

However, there is an easy way to fix the contacts. It's my experience that clicking the Full name button then closing the Check name dialog and saving the contact removes the company name from the subject field. If you have a lot of contacts affected, a version of my super-duper bulk contact macro that copies and resets the first and last name field is faster.

To see if any of your contacts are affected (in either Outlook Contact's folder or a Public Folder Contacts folder), switch to the List view. Right click on the row of field names and choose Field chooser. Choose All Contact fields (or All Mail fields) and drag the Subject field to the row of field names. (Or click the View Settings button on the View ribbon to open the customize view dialog then click Columns.)

Subject field in Outlook Contact

If you only have a few contacts with the company name in the subject, you can click the check name button on each, otherwise, use the macro below to touch the name fields.

Macro to remove the company name

Public Sub SetNames()
 
  Dim currentExplorer As Explorer
  Dim Selection As Selection
  Dim obj As Object
  
  Set currentExplorer = Application.ActiveExplorer
  Set Selection = currentExplorer.Selection
 
  '  On Error Resume Next
 
 For Each obj In Selection
  'Test for contact and not distribution list
  If obj.Class = olContact Then
  Set objContact = obj
  With objContact
  Let .User3 = .FirstName
  Let .User4 = .LastName
  
  .FirstName = .User3
  .LastName = .User4
  
  strFileAs = .FullName
  .FileAs = strFileAs
  .Save
  End With
  End If
  Err.Clear
  Next
 
  Set obj = Nothing
  Set objContact = Nothing
End Sub

How to use macros

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To put the code in a module:

  1. Right click on Project1 and choose Insert > Module
  2. Copy and paste the macro into the new module.

More information as well as screenshots are at How to use the VBA Editor

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.

Please post long or more complicated questions at Outlookforums.

Leave a Reply

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