Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to batch change file as format for all contacts in Outlook?

In general, the contact files are displayed as Last name First name in Outlook, but how can you quickly batch change the contact files as format to Company or other order as below screenshot shown? The Option Default “File as” order only can work for the new contact but not the existed ones. Here, I introduce a VBA code to batch change file as format for all existed contacts in Outlook.

remove all duplicate contacts from one or multiple contacts folders in outlook

In sometimes, we may repeatly add the same contacts, how can remove the duplicate contacts from one or multiple contacts folders? Kutools for Outlook's Duplicate Contacts function can quickly remove or merge duplicate contacts based on emails, full name or other criteria from one or more contacts folders .    Click for 45 days free trial!
doc remove duplicate contacts 1
 
Kutools for Outlook: with dozens of handy Outlook add-ins, free to try with no limitation in 45 days.

Batch change file as for all contacts with VBA

Kutools for Outlook: 100+ New Advanced Tools for Outlook.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu: Bring Old Menus and Toolbars Back to Office 2007, 2010, 2013, 2016 and 2019.

Batch change file as for all contacts with VBA

1. Select the contacts you want to change the file as, press Alt + F11 keys to enable the Microsoft Visual Basic for Applications window.

2. Double click at ThisOutlookSession in Project-Project1 pane, and copy and paste below code to the blank script.

VBA: Change file as

Sub ChangeFileAsforContracts()
'UpdatebyExtendoffice20180404
Dim xSelItems As Object
Dim xItem As Object
Dim xContact As ContactItem
Dim xFileAs As String
On Error Resume Next
If Outlook.Application.ActiveExplorer.CurrentFolder.DefaultItemType <> olContactItem Then
    MsgBox "Please select the contact folder first", vbInformation + vbOKOnly, "Kutools for Outlook"
    Exit Sub
End If
Set xSelItem = Outlook.ActiveExplorer.Selection
For Each xItem In xSelItem
    If xItem.Class = olContact Then
        Set xContact = xItem
        With xContact
            If .CompanyName = "" Then
                xFileAs = .FullName
            Else
                xFileAs = .CompanyName
            End If
            .FileAs = xFileAs
            .Save
        End With
    End If
Next
End Sub

doc change file as 3

3. Press F5 key to run the code, then all selected contacts have been changed the file as company.

Note:

1. In the code, you can change CompanyName to other fields you want to display file as.

2. If there is no company information, it will display the full name.

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.