• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

How can I change Contacts "DISPLAY AS" e-mail address information

Using Outlook 2007 and 2010 on Win XP.   Is there a way to change the default email "Display As" format in the contact info?  
This IS NOT for setting the Name & Filing Options (Full Name and File As) under Tools, Contacts.
I want to control the E-MAIL Address "DisplayAs:" field.

Thank you.
  • 2
  • 2
  • 2
1 Solution
Slipstick has a good solution for this and if you're not comfortable with VBA there are tools listed to make the changes

David LeeCommented:
Hi, BIC9125.

Are you looking for a one time solution to adjust all the existing email display as fields, or are you looking for a solution that will set them properly every time you create a contact?  If the former, then the code kpmartin linked to is the solution.  If the latter, then that same code will do if you want to remember to run it after you create each contact.  If you don't want to have to remember, then you need a different solution.
BIC1925Author Commented:
BlueDevilFan -
Can instruct users to input specific way going forward, so at this point I am looking to adjust the existing ones.  I tried the code - so far it doesn't correct existing entries.  Still testing . . . .
Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

David LeeCommented:
Tried what code?
Yea, Inquiring minds want to know!
BIC1925Author Commented:
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
            ' 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

            End With
        End If


    Set objOL = Nothing
    Set objNS = Nothing
    Set obj = Nothing
    Set objContact = Nothing
    Set objItems = Nothing
    Set objContactsFolder = Nothing
End Sub
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now