Bulk Change File As Format for Contacts

Written by Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999 and involved in IT support since 1985, Diane is the author of several books and video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums. +Diane Poremsky+

38 responses to “Bulk Change File As Format for Contacts”

  1. This is the script I havge been looking for.
    I ran the VBA script in Outlook 2007 to change the FileAs property of all my contacts to “Firstname Lastname”, with partial success. All contacts with a title (Mr. or Mrs.) kept their old display property, meaning “Smith, John” became “John Smith”, but “Mr. Ferguson Alex” did not change.
    Is there an updated version/fix for this script available?

  2. Works with Outlook 2010 SP1. Haven’t tested with anything other than .FullName, but it served it’s purpose. Thanks for the script!

  3. I’m not used to doing any of this stuff but input the script as explained. How do I actually run it? What do I do after pasting it into VBA?

  4. Need some help. I am getting an “Compile error: Expected End Sub” error. I do not have any distribution lists in my contact folder.
    I pasted the code into VBA under ThisOutlookSession.
    Went back to Outlook and have selected the contact folder and also tried to select all contacts in the folder.

    I keep getting this error any suggestions? I feel that maybe I am not selecting the contact list correctly.
    After I clear the error, the ver first line “Public Sub ChangeFileAs () is highlighted in yellow with a yellow arrow to the left of it.

  5. I have more than one contacts folder (suppliers, as well as contacts, which is customers and personal contacts). If I select the one (suppliers) I want to update, it does not update it. Any ideas? Can I change the “set” references in the script to “suppliers” where “contacts” currently appears?

  6. it may be something I did, but i got a syntax error. I copied into the editor after alt-f11.

    i copied from “public…
    to
    …end sub”

  7. Oddly enough, (no error after pasting the text), but instead of changing “file as” to [company (last, first)] it erases the “file as” field. Not on all the contacts, but the contact I have selected in outlook, in the background. If nothing is selected, nothing is changed.

    Thanks for the help by the way, even though I haven’t been able to knock this out yet.

    I’d do this by hand, but there are 920 vendors in my outlook. Thanks again for any help.

  8. I did not remove any apostrophes. Pasted it as it was in the text file.

  9. I deleted the ‘. Sorry I didn’t know what that meant. Newbie to this stuff.

    FYI, it only worked when a record was selected. Therefore, I had to select the records within my contacts folder to make it work.

    OL 2007 (12.0.6562.5003) on Win 7×32

    Thanks for the help!

  10. Can you tell me how to display the Notes section on the address book? One of my staff really wants to see her notes when viewing the address book. Is this possible in Office 2010?

  11. I am getting a “Compile error: Expected End Sub” error as well. I downloaded the text file and pasted from that, and it isn’t working. When I get that error the first line is highlighted in yellow and “objContact =” from

    If obj.Class = olContact Then
    Set objContact = obj

    is highlighted in blue.

    Thanks!

  12. Worked brilliantly! Thanks!

    Is there any way to change the File As to First Name Last Name (Company)? Other than manually, that is.

  13. I don’t use the default Outlook Contacts Folders, but iCloud. I guess the following line needs to be changed:
    Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
    question is, how do I identify the name of the icloud contacts Folder?

  14. Thank you, easy to set up. Just after I copied the script there were two errors, but copying it from the link you provided in comments it worked.

  15. Thanks for this Diane! So I installed the VBA but when running, the “play” icon is not highlighted it seemingly does nothing. When it is running (I think) and when I click on the shortcut in the outlook after highlighting the contact, it erases the whole “File As” field.

    My question is: How do I use this macro?

  16. Magnificent – found this VBA “how to” and reorganised 1076 contacts within less than 5 minutes!
    thanks

  17. I feel that I’m so near to what I need, but can’t quite finish off – can you assist?

    I’m following the “Change only the ‘subject’ field used by the Address book” instructions above, but fail at the “Usage” paragraph in the ReadMe file – I don’t see the 3 buttons! I simple want the sort order in the address book to be the same as the values in the FileAs Field, ie Subject Field = FileAs.

    I’m using Outlook 2010 on a standalone Windows 7 PC (ie no exchange server).

    The form reads as if this is a one off, bulk conversation – is there script to set this as the permanent option for all new/amended contacts?

    Thanx, Pete

  18. Hi all,

    really useful vba macro indeed.

    I have an additional problem and was wondering if anyone has solved it before:

    At the office we have been inputting the First and Last Name in the wrong order – meaning that Outlook was set up to expect First Last in the Fullname field while we were putting Last First. Now more thatn 1000 contacts have the wrong order in the Fullname field. Is there a VBA for a bulk change (order reverse)?

    Thanks,

    Markos

  19. Hello,
    thank you! the change File As for default folder worked perfect.
    I do have other contact folders that i was hoping to change the file as, so i selected the contact folder, went to VBA by pressing Alt+F11, paste the selected folder script but when trying to run i get an error:

    it highlights “folder As Outlook.folder” and pop ups the following error:
    Compile Error:
    User-Defined type not found

    i am using outlook 2003.

    can you help please?
    thanks

  20. I could not get this to work. Let me give you how things are setup in my system.
    I am running Win 7 and Outlook 2010.
    I am connected to an exchange server so I do not have a pst file, instead on pc is an ost file.
    I have 24 contact folders all with unique names under My Contacts
    When I run the script I get the following error
    Compile error:
    Syntax error
    The script stops at Firstname Lastname format
    I have removed the ‘ from both the Firstname Lastname format line and the strFileAs – .FullName
    Can you advise me on what to do next?
    Thanks

  21. Forever in your debt, Diane, works flawlessly.

  22. Needed to add “Sub” to end last line but worked great.

    Thanks a million Diane. Saved me so much time. :)

  23. Thankyou Diane this is brilliant. I have used both VBA for Display as ans File as. Very nice and convenient. Pitty it choices aren’t available in contacts as a default.
    Thanks

  24. Thanks!

  25. I added the following three lines after the .FileAs= line to update the way e-mail addresses are displayed, to make them consistent with the contact name:

    ‘ Set “Display As” name in Contact folder

    If .Email1Address “” Then .Email1DisplayName = .FileAs & ” (” & .Email1Address & “)” Else .Email1DisplayName = “”
    If .Email2Address “” Then .Email2DisplayName = .FileAs & ” (” & .Email2Address & “)” Else .Email2DisplayName = “”
    If .Email3Address “” Then .Email3DisplayName = .FileAs & ” (” & .Email3Address & “)” Else .Email3DisplayName = “”

Leave a Reply

More in Contacts
Address book display names
Bulk Change Email Display Name Format

The default email display name in the address book used to be "Full Name (Email1)", "Full Name (Email2)", "Full Name...

Close