Outlook 2007 File As Field

Posted on 2008-11-10
Last Modified: 2012-06-21
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.

Question by:Undisputed
    1 Comment
    LVL 76

    Accepted Solution

    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


    Featured Post

    Too many email signature updates to deal with?

    Are you constantly visiting users’ desks making changes to email signatures? Feel like it’s taking up all of your time? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

    Join & Write a Comment

    Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
    Outlook Free & Paid Tools
    In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now