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
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.)
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:
- Right click on Project1 and choose Insert > Module
- Copy and paste the macro into the new module.
More information as well as screenshots are at How to use the VBA Editor