Address card shows full name instead of file as

My address cards are showing full name rather than file as. If I go into a contact and click on the full name button, then save, the contact displays properly. Address book is set to sort by file as. This was a recent occurrence after upgrade of either OWA or my Android phone to 2.2 (not sure which).

Thanks for the tip. I suspected that was the culprit. I searched the Internet and put together this macro to fix my contact list. Assuming that the FileAs is correct, this seems to fix the contacts. They seem to have synced to my phone OK as well.  This macro will set the FileAs attribute for all contacts you select. There's definitely something weird going on, as I needed the superflous assigns before setting the FileAs to what it was originally. If they weren't there, the FileAs was First Last. If they are there, FileAs shows as Last, First, which I have it set to. I suspect this is some interplay between Exchange and my local cache, but this approach seems to work. If you just want to do the whole Contacts folder, you can switch the comments on some of the lines (if you know a little about macros, this will be fairly easy).

Here is the macro:


Public Sub ChangeFileAs()
    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
    Dim objSelection As Outlook.Selection
    On Error Resume Next
    Set objOL = CreateObject("Outlook.Application")
    Set objNS = objOL.GetNamespace("MAPI")
'    Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
'    Set objItems = objContactsFolder.Items
    Set objSelection = objOL.ActiveExplorer.Selection
    For Each objItem In objSelection
'    For Each obj In objItems
        'Test for contact and not distribution list
        If objItem.Class = olContact Then
            Set objContact = objItem
            With objContact
                strFirstName = .FirstName
                strLastName = .LastName
                strFileAs = strFirstName & " " & strLastName
                strFileAs = .FileAs
                .FileAs = strFileAs
            End With
        End If

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated March 31, 2018 Views 13,786 Applies to: