• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Bulk Change Email Display Name Format

Slipstick Systems

› Outlook › People › Bulk Change Email Display Name Format

Last reviewed on August 6, 2019     124 Comments

Applies to: Outlook (classic), Outlook 2007, Outlook 2010, Outlook 365 (Win)

The default email display name in the address book used to be "Full Name (Email1)", "Full Name (Email2)", "Full Name (Email3)" but was changed to "Full Name (email address)". If you upgraded from an earlier version of Outlook, your contacts may use a mix of display name formats. The code below will allow you to easily convert all contacts to a uniform format or remove the address for security reasons, per a discussion in TechNet forums:

Using the File As... format without (email address) displayed, when people forward emails, messages will not contain the email address visible for others, just the display name, or not accessible for worms or other user's mailbox attackers.

This code sample works on the Display name for the default email address (Email1) but can easily be changed to work with Email2 or Email3.

This code sample was created from Change Contact's File As format

To change the File as format on existing contacts, see Bulk Change File As Format for Contacts. Our third "Bulk change Contacts" VBA sample is at Bulk Move Phone Numbers to a Different Phone Field.

The Name column (1) is controlled by the Address book setting. Column 2, the email Display Name, defaults to Full Name (email address) format. The code on this page will change this field.

Address book display names

To change the Name column (1) in Outlook 2010 and newer, you'll start at File, Account Settings, Address book Tab, double click on the Outlook Address book. In Outlook 2007, the options for the Name column format is at Tools, Account Settings, Address book Tab, double click on the Outlook Address book and choose between Full name or File as format.

Note that when you edit a contact's email address, the display name is rewritten using Outlook's default format. You'll need to edit it before saving the contact.

While you can't change the default settings for the Display Name field (it always uses 'Full name (address)' format), you can use VBA to change your contacts so they all use the same format. Your choices are limited to Full name, Last First, FileAs, and Company. You can include the email address by adding this code to the format code: & " (" & .Email1Address & ")".

Default email display name format:
Email display name field on a contact

After running the VBA code below:
A contact after running the VBA code

When you click the To button, the entry in the Address book will now look like this:
Outlook 2010's address book, after running the VBA

Not up to working with VBA code? See Tools for tools that can make this change.

Two formats in the code sample below are less than useful as Display name formats:

strFileAs = .CompanyName & " " & .FullName & " (" & .Email1Address & ")"

Results in a leading space if the Contact does not have a Company listed.

'strFileAs = .FileAs

Uses only the Company name in the display name when the FileAs format is "Company name (Fullname)".

Note: I updated the code below to check for email addresses. If an address does not exist, the contact is skipped.

 

VBA Code to Change the Email Display Name

Press Alt+F11 to open the VBA editor then copy and paste into ThisOutlookSession. Uncomment the strFileAs line that uses the format you desire before running it.

This code was tested with Outlook 2010, 2007, and 2003. (May trigger the Email security prompts in Outlook 2003.)

If you have multiple contacts folders, ChangeEmailDisplayName_SelectedContacts will change the selected contacts. It checks for an email address (If .Email1Address <> "" Then) and only updates contacts with email addresses.

 
Public Sub ChangeEmailDisplayName()
    Dim objOL As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objContact As Outlook.ContactItem
    Dim objItems As Outlook.Items
    Dim objContactsFolder As Outlook.MAPIFolder
    Dim obj As Object
    Dim strFirstName As String
    Dim strLastName As String
    Dim strFileAs As String

    On Error Resume Next

    Set objOL = CreateObject("Outlook.Application")
    Set objNS = objOL.GetNamespace("MAPI")
    Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
    Set objItems = objContactsFolder.Items

    For Each obj In objItems
        'Test for contact and not distribution list
        If obj.Class = olContact Then
            Set objContact = obj

          With objContact
    
          If .Email1Address <>"" Then
            ' Uncomment the  strFileAs line for the desired format
            ' Add the email address to any string using
            ' the following code:
            ' & " (" & .Email1Address & ")"
                 
             'Firstname Lastname (email address) format
             ' strFileAs = .FullName & " (" & .Email1Address & ")"
                
             'Lastname, Firstname format
              strFileAs = .LastNameAndFirstName
                
             'Company name (email address) format
             ' strFileAs = .CompanyName & " (" & .Email1Address & ")"
                 
             'Comapany Firstname Lastname (email address) format
             'the display name will have a leading space if
             'the contact doesn't have a company name
             'strFileAs = .CompanyName & " " & .FullName & " (" & .Email1Address & ")"
                

             'File As format
             'Does not support Company (Fullname) format. 
             'Only Company name is used in the display name
             'strFileAs = .FileAs
                
             .Email1DisplayName= strFileAs

             .Save
           End If
          End With
        End If

        Err.Clear
    Next

    Set objOL = Nothing
    Set objNS = Nothing
    Set obj = Nothing
    Set objContact = Nothing
    Set objItems = Nothing
    Set objContactsFolder = Nothing
End Sub

How to use the Macro

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

To check your macro security in Outlook 2010 and newer, 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. If Outlook tells you it needs to be restarted, close and reopen Outlook. Note: after you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Now 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.
  3. Click the Run button in the VBA editor to run it, or if you need to run this frequently, add a button for the macro toyour ribbon.

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

More Information

More Bulk Change Contact articles at Slipstick.com:

  • Bulk Change Contact's FileAs Format to Match Outlook's Default Setting
  • Bulk Change File As Format for Contacts
  • Bulk Move Phone Numbers to a Different Phone Field
  • Macro to Swap First and Last Name Fields
  • Show the Home Address on a Contact Form by Default
  • Update Contact Area Codes
  • Update Contacts with a New Company Name and Email Address
Bulk Change Email Display Name Format was last modified: August 6th, 2019 by Diane Poremsky

Related Posts:

  • Bulk Change File As Format for Contacts
  • Use PowerShell to Bulk Change Contacts
  • Update Contacts with a New Company Name and Email Address
  • Bulk Change Contact's FileAs Format to Match Outlook's Default Setting

About 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.

Subscribe
Notify of
124 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Jimmy (@guest_219169)
February 10, 2022 7:47 pm
#219169

Diane,

Came across your script and it works beautifully. I do have a question hopefully, you might be able to help me out or point me to the right source.

We recently migrated from Google Workspace to MS 365 with Exchange online. All of my contacts migrated fine however, opening a contact, the contact's email address is in email3 instead email1. Is there a script/tool that I can run/use to copy email addresses from email3 to email1?

Thanks.
Jimmy

0
0
Reply
George (@guest_219087)
January 17, 2022 9:38 pm
#219087

Thanks so much for this, this worked perfectly.

If I want to have the "Display As" to be "FirstName and Last Name" rather than "Lastname and firstname" how do I go about doing that?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  George
January 17, 2022 10:57 pm
#219088

You'd use :
strFileAs= .firstname & " " & .lastname

or
strFileAs = .fullname


0
0
Reply
D K (@guest_215650)
July 24, 2020 10:33 am
#215650

Your original code worked perfectly; however, I've got a number of contacts with no company listed. I tried embedding a second if statement so I don't get empty "()" at the end of some contacts, but I get a Compile Error: End With without With. Modified code is below. What am I missing?

     With objContact
   
     If .Email1Address <> "" Then
     If .CompanyName <> "" Then
         
       'Firstname Lastname (Company) format
       strFileAs = .FullName & " " & "(" & .CompanyName & ")"
               
       .Email1DisplayName = strFileAs

       .Save
       
      ElseIf .Email1Address <> "" Then
      If .CompanyName = "" Then
      
      'Firstname Lastname format
       strFileAs = .FullName
       
       .Email1DisplayName = strFileAs

       .Save
       
       End If
      
     End With
    End If

    Err.Clear
  Next

  Set objOL = Nothing
  Set objNS = Nothing
  Set obj = Nothing
  Set objContact = Nothing
  Set objItems = Nothing
  Set objContactsFolder = Nothing
End Sub

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  D K
July 24, 2020 4:10 pm
#215651

it looks like it's missing an if -

       End If
 end if     
     End With
    End If

(the last end if is not needed if there is not an IF line before the With line. )

Last edited 4 years ago by Diane Poremsky
0
0
Reply
D K (@guest_215653)
Reply to  Diane Poremsky
July 24, 2020 10:30 pm
#215653

Thanks for the quick reply. Unfortunately, I'm still getting the same error message. I tried changing the closing argument to:

    End If
    End If
   End With
End If

When that did not work, I tried:

    End If
    End If
   End With

I received the same error message every time.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  D K
July 25, 2020 12:02 am
#215654

I got it to work with these lines.

   .Save
    
    End If

  End If
   End If
   End With
  Err.Clear
  End If
 Next

0
0
Reply
D K (@guest_215734)
Reply to  Diane Poremsky
August 7, 2020 4:53 pm
#215734

Thanks!

One final question, does this code only work on contacts stored in an Outlook/microsoft account? I have my icloud email and contacts set up in Outlook 2010. The code work fine to change names for all my work contacts in my Exchange account, but when I run the macro on my iCloud contacts, it doesn't change anything.

0
0
Reply
Guillermo Barquero (@guest_212882)
March 6, 2019 4:52 pm
#212882

Thank you so much!!!! This saved me (and, in turn, my grandparents) so much time! It's also given me a chance to take a look at visual basic macros, thanks again for broadening my horizon!

0
0
Reply
Emmet H (@guest_205179)
March 11, 2017 6:55 pm
#205179

Hi all,

I've just run this code and it's worked exactly as I think it should have in that all my contacts Display As fields are now "last name, first name".

The reason I'm unsure if this is the outcome that is expected is that this is my first time ever running a macro or using VBA. For that reason also I'm not sure how to change the code to get what I would like, and wouldn't even be confident enough to understand the required changes even if someone has already posted it here (apologies if that's the case and I'm going over old ground).

What I would like to do is change all my contacts Display As fields to "Full Name - Company (email)". How should I change the code (currently exactly a is above) to achieve this?

Any help would be very much appreciated.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Emmet H
March 12, 2017 1:05 pm
#205182

if you want fullname - company (email) and its not a default format, you need to the fields together:
strFileAs = .fullname & " - " & .companyname & "(" & .email1address & ")"

you can test it without change anything first by replacing this line:
.Email1DisplayName= strFileAs
with
debug.print strfileas
Then View menu > Immediate window before running the macro.
You'll see the results in the VBA editor.

0
0
Reply
Paul Nielsen (@guest_203852)
January 11, 2017 9:40 am
#203852

Diane - I recently imported my contacts into a new Outlook 365 account and the sorting and view are different. The card used to show Last Name, First Name followed by Company Name (in the grey area) and then in the card Display As, the Full Name (email address). I tried running a few of your fixes but obviously don't know what I am doing. Please help!

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Paul Nielsen
March 12, 2017 1:18 pm
#205184

Sorry I missed this earlier. Did you get it straightened out? You need to open one contact then click the Full Name button to see if they are in the right fields. If so, the problem is the view - I'd try resetting it or customizing it.

0
0
Reply
T. J. (@guest_201594)
September 15, 2016 11:45 am
#201594

outlook 2016 will not send emails using outlook.com with email address in "display as". how do I remove them?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  T. J.
September 18, 2016 12:53 am
#201661

use the macro on this page and either
strFileAs = .LastNameAndFirstName
or
strFileAs = .Fullname

but... my guess is the problem is something else as Outlook's default is to create the display name in name (address) format.

Is your account on the new server?

0
0
Reply
ChrisP (@guest_198955)
May 25, 2016 4:57 pm
#198955

Hello Diane,

I tried running the code, but it does not seem to work. It is my first time using VBA and I am not getting any errors when I run it. I think I might be doing something wrong. I currently am running Outlook 2016 with Office. My user has over 1000 contacts and I am unable to get the First Name Last Name to show with the email address in autocomplete when typing in email. There are also times when some addresses do not come up at all when I start typing. By the way, I do have Cached Exchange Mode checked in case you were wondering.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  ChrisP
May 26, 2016 12:19 am
#198966

Do you have macro security set to low?

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 15

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • How to Remove the Primary Account from Outlook
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • Remove a password from an Outlook *.pst File
  • Reset the New Outlook Profile
  • Maximum number of Exchange accounts in an Outlook profile
  • Save Attachments to the Hard Drive
  • How to Hide or Delete Outlook's Default Folders
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
  • Classic Outlook is NOT Going Away in 2026
  • Use PowerShell to Delete Attachments
  • Remove RE:, FWD:, and Other Prefixes from Subject Line
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Classic Outlook is NOT Going Away in 2026

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Newest Code Samples

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Use PowerShell or VBA to get Outlook folder creation date

Rename Outlook Attachments

VBA Basics

How to use the VBA Editor

Work with open item or selected item

Working with All Items in a Folder or Selected Items

VBA and non-default Outlook Folders

Backup and save your Outlook VBA macros

Get text using Left, Right, Mid, Len, InStr

Using Arrays in Outlook macros

Use RegEx to extract message text

Paste clipboard contents

Windows Folder Picker

Custom Forms

Designing Microsoft Outlook Forms

Set a custom form as default

Developer Resources

Developer Resources

Developer Tools

VBOffice.net samples

SlovakTech.com

Outlook MVP David Lee

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment