?
Solved

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

Posted on 2010-08-23
8
Medium Priority
?
372 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
Independent Software Vendors: 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!

 
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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Mailbox Overload?
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

764 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