Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / General MS Outlook Questions / March 2008

Tip: Looking for answers? Try searching our database.

File As

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
April - 14 Mar 2008 17:44 GMT
I want to change all my contact so they are setup with the new format of
"Firstname, Surname" in the "File As" field.

Some of my old contacts have a blank "File As" field and others the format
of "Surname, first name".  Is there a quick way to bring these all in line
with the above format?

Is it best to leave the contact with a blank "File As" as they are with no
text?

Thank you
Michal [Outlook MVP] - 14 Mar 2008 19:03 GMT
Hi April,

IMO the best way (if not the only) is a simple macro. You will find it below.
It is for Outlook 2007. If you're using earlier version, replace the first line with:
 Dim oFolder As MAPIFolder

Sub FileAs()

    Dim oFolder As Folder
    Set oFolder = Session.PickFolder

    If oFolder Is Nothing Then Exit Sub

    For Each Item In oFolder.Items
        Dim oContact As ContactItem
        Set oContact = Item
        If Not oContact Is Nothing Then
            If oContact.FirstName = "" Then
                oContact.FileAs = oContact.LastName
            ElseIf oContact.LastName = "" Then
                oContact.FileAs = oContact.FirstName
            ElseIf oContact.LastName <> "" Then
                oContact.FileAs = oContact.FirstName & ", " & oContact.LastName
            End If
            oContact.Save
            Set oContact = Nothing
        End If

    Next

End Sub

Signature

Best regards,
Michal [Microsoft Outlook MVP]

http://www.codetwo.com
Share Outlook on the net without Exchange!

> I want to change all my contact so they are setup with the new format of
> "Firstname, Surname" in the "File As" field.
[quoted text clipped - 7 lines]
>
> Thank you
April - 18 Mar 2008 14:51 GMT
Thanks, but the problem is that I do not understand what the code is doing?
and also I have not used the macro facility before?  Seems like alot of work
for a beginner.

ie.  what does Dim oFolder As Folder mean?  and what does Set oFolder =
Session.PickFolder?

> Hi April,
>
[quoted text clipped - 42 lines]
>>
>> Thank you

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.