To change the default File As format used for new contacts, go to Tools, Options, Contacts options in older versions or File, Options, Contact options in Outlook 2010.
Outlook's Contact's offer a number of File As formats and this format can be used for the contact's name display in the Address Book. However changing the File As format on a large number of contact's is time-consuming when you need to change the contacts one by one. You can do it using VBA or a utility (listed below).

The file as format options are shown in the screenshot. The VBA code sample supports all 5 formats and works with Outlook 2000, 2002, 2003, 2007.
Along with changing the File As order, you can change the order Outlook assumes you use when you enter the name. This setting determines how the names populate the dialog when you press the Full name button. If the name order is wrong in FileAs ("Mary, Smith" when using last, first format), check this setting. If you choose Last First format you don't need to use a comma to separate the names when you enter them and First Last1 Last2 correctly puts the name in the middle position into the last name field, not the middle name field. Outlook will detect names separated by commas as Last, First format, regardless of the Fullname format setting.
VBA Sample
The following code sample supports all 5 File As formats available in Outlook. Press Alt+F11 to open the VBA editor then copy and paste into ThisOutlookSession. Uncomment the strFileAs line that uses the format you desire before running it. (Uncomment the line by removing the apostrophe from in front of the strFileAs = [name_format] command you wish to use.)
This code was tested with Outlook 2000, 2002, 2003, 2007 and 2010.
See the comment below, for VBA that works on the selected folder. (Tested in Outlook 2010.) ![]()
To use, select the Contacts folder in Outlook then return to the VBA Editor and press the Run button or F5 to run the macro. You can run the macro later by pressing Alt+F8 (after selecting the Contacts folder) then choosing the macro and pressing Run.
To help eliminate errors, we have text files containing the VBA code samples available. To use, open the text file and Select all (Ctrl+A), copy then paste into the VBA editor. To save to your computer, right-click and choose 'Save Target as'.
Original code - change contacts in default folder | Change contacts in selected folder
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
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
' Comment out strFileAs = .FullName (unless that is the desired format)
'Lastname, Firstname (Company) format
' strFileAs = .FullNameAndCompany
'Firstname Lastname format
strFileAs = .FullName
'Lastname, Firstname format
' strFileAs = .LastNameAndFirstName
'Company name only
' strFileAs = .CompanyName
'Companyname (Lastname, Firstname)
' strFileAs = .CompanyAndFullName
.FileAs = 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 SubCommon Errors

After pasting the code into the VB editor, the colors should be similar to the colors in this screenshot (and as seen in the code sample above).
Any text shown in Red has an error in it.
Blue, Black, and Green are "good", with the Blue color indicating VBA commands (If, Then, End etc), Black is your variables, and Green is used for comments. The second line in one of the 5 sets of Green lines needs to have Black text. You do this by removing the apostrophe (') from in front of the line. If more than one of those 5 lines is black, add an apostrophe to front of the format line you don't want to use. (In my screenshot, the second set is the format I want to use.)
Change only the 'subject' field used by the Address book
Use the Outlook File As Order custom form to change just the display in the Address book, from Last name first, to First name first or use the File As entry.
Notes:
- This method will not change the actual sort order in the Contacts folder or format used on the File As field.
- Will return an error if there are distribution lists in the Contacts folder.
- This has the same options as you'll find in Tools, E-mail Accounts, View or change existing Address books, Outlook Address book properties, but also adds Last name first option and full File As format, including the Company name.
- Works on any contact folder - select the folder before clicking Run in the VB Editor or pressing F5. Leave the editor open and select another folder to use it on additional folders.
Tools
ContactGenie Toolkit - 28 functions for Outlook 2000-2010 enabling changes to individual standard and custom fields; standardization for Message Class, CompanyName, FileAs, EmailDisplayAs, Fullname, and other fields; contact and NK2 info export; export contacts to CSV file; global changes for CompanyName, Company Address, Email and Web addresses. Preview/override any pending changes. Add Birthday/Anniversary/user-defined dates to default calendar. Personal Distribution Group management functions and more. |
More Information
How to Change the File As Field for All Contacts
How to Change the 'File As' Field Order for Contacts
Articles that may interest you:
Last reviewed on Sep 23, 2011



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?
I’ll have to test it – I’ve never seen that happen, but I don’t use a lot of titles either. It should not affect it as the title isn’t used in the file as field.
Works with Outlook 2010 SP1. Haven’t tested with anything other than .FullName, but it served it’s purpose. Thanks for the script!
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?
Select the contacts folder that needs changed and press the Run button (or F5) in the VB Editor.
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.
Is the last line in the VB Editor “End Sub” ? Make sure you have it (and all the code in between). You should be able to click in the code box above and press Ctrl+A, C to select all and copy it.
The font size is larger in Firefox so the code extends beyond the codebox but Ctrl+A will select all, whether it is visible or not. (Font size is now fixed – the entire code sample should display in the box, ending in End Sub.)
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?
This is quick and dirty but it should work (does here in Outlook 2010) – changed part is the first few lines (down to ojbclass- olcontact then) and the objects that are released at the end.
To avoid errors, copy the VBA from this file:
http://www.slipstick.com/code-samples/change-fileas-format-selected-folder.txt
Public Sub ChangeFileAs()
Dim Session As Outlook.NameSpace
Dim currentExplorer As Explorer
Dim Selection As Selection
Dim currentItem As Object
Dim folder As Outlook.folder
Dim obj As Object
Dim strFirstName As String
Dim strLastName As String
Dim strFileAs As String
Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection
On Error Resume Next
For Each obj In Selection
Set folder = currentItem.Parent
‘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
‘Lastname, Firstname (Company) format
‘ strFileAs = .FullNameAndCompany
‘Firstname Lastname format
‘ strFileAs = .FullName
‘Lastname, Firstname format
‘ strFileAs = .LastNameAndFirstName
‘Company name only
‘ strFileAs = .CompanyName
‘Companyname (Lastname, Firstname)
‘ strFileAs = .CompanyAndFullName
.FileAs = strFileAs
.Save
End With
End If
Err.Clear
Next
Set Session = Nothing
Set currentExplorer = Nothing
Set obj = Nothing
Set Selection = Nothing
Set currentItem = Nothing
Set folder = Nothing
End Sub
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”
It’s the ‘ that mark comments- they are probably red in the VB Editor – they should be green. For whatever reason the ‘ was changed. (One can learn to hate this software… and I mean wordpress, not outlook. Sometimesi think wordpress has as many quirks and annoyances as outlook.)
Try the code here: http://www.slipstick.com/code-samples/change-fileas-format-selected-folder.txt – it should be perfect.
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.
Did you remove the apostrophe from one of the formats? I’ll post a screenshot above in a few minutes so you can see what you should be seeing.
I did not remove any apostrophes. Pasted it as it was in the text file.
I updated the instructions and added a screenshot – remove an ‘ from the format you want to use then run it.
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!
Glad we got that straightened out – and thanks for pointing out areas where i needed to improve the instructions.
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?
That is not possible in any version of Outlook. She can use the Contacts folder to view the notes then right click on the contact and choose Create > New message to.
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!
Any lines shown in red?
Is End Sub the last line in the mcro?
Worked brilliantly! Thanks!
Is there any way to change the File As to First Name Last Name (Company)? Other than manually, that is.
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?
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.
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?
Did you remove the comment from the line you wanted to use? If not, it sets the fileas to nothing.
Magnificent – found this VBA “how to” and reorganised 1076 contacts within less than 5 minutes!
thanks
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
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
It is possible. I used this code at http://www.slipstick.com/outlook/contacts/bulk-move-phone-numbers-to-a-different-phone-field/ as the base – moved the first and last names to the user3 and user4 fields then made the swap. I uploaded a file to http://www.slipstick.com/macros/ChangeFirstLast.txt with the code. I’ll write up an article on it next – I’m sure you aren’t the only one who needs to make the swap.
Note that my code assumes you are not using the user3 and user4 fields for anything. To confirm those are empty, add them to a list view so you can quickly check.
ETA: I have this macro written up at Swap First and Last Name Fields