Outlook 2007 File As Field

Hi Experts -

I have a user that was using entourage 2004 and we migrated over all her contacts (3000+) to our new system (Outlook 2007 / Exchange 2007) but her contacts are missing the file as field.  The file As field is missing; therefore, it is not allowing her to send emails from outlook.  My question... Is there a way to bulk modify all the contacts so that it can change the file as to Last, First?  I would hate to do it one by one for all 3000+ contacts.

Who is Participating?
David LeeConnect With a Mentor Commented:
Hi, Undisputed.

This is easily done with the script below.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on Module1
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comments wherever something needs to or can change
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Select the Contact folder by clicking on it in the folder list
9.  Run the macro

The code loops through all the contacts in the folder setting FileAs to LastName, FirstName.  The code will only work in Outlook, not Entourage.

Sub SetFileAs()
    Dim olkItems As Outlook.Items, _
        olkContact As Object
    Set olkItems = Application.ActiveExplorer.CurrentFolder.Items
    For Each olkContact In olkItems
        With olkContact
            If .Class = olContact Then
                'Edit the next line to change how FileAs is populated'
                .FileAs = .LastName & ", " & .FirstName
            End If
        End With
    Set olkContact = Nothing
    Set olkItems = Nothing
    MsgBox "Finished", vbInformation + vbOKOnly, "Set FileAs"
End Sub

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.