Solved

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

Posted on 2010-08-23
8
356 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
  • 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Get an idea of what you should include in an email disclaimer with these Top 5 email disclaimer tips.
Use email signature images to promote corporate certifications and industry awards.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now