Solved

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

Posted on 2010-08-23
8
362 Views
Last Modified: 2013-02-10
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.
0
Comment
Question by:BIC1925
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
8 Comments
 
LVL 7

Expert Comment

by:kpmartin
ID: 33501964
Slipstick has a good solution for this and if you're not comfortable with VBA there are tools listed to make the changes

http://www.slipstick.com/contacts/emaildisplayname.asp
0
 
LVL 76

Expert Comment

by:David Lee
ID: 33509248
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.
0
 

Author Comment

by:BIC1925
ID: 33587269
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 . . . .
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 76

Expert Comment

by:David Lee
ID: 33591127
Tried what code?
0
 
LVL 7

Expert Comment

by:kpmartin
ID: 33591231
Yea, Inquiring minds want to know!
0
 

Accepted Solution

by:
BIC1925 earned 0 total points
ID: 34115506
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

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question