Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

File As

0 views
Skip to first unread message

April

unread,
Mar 14, 2008, 12:44:52 PM3/14/08
to
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]

unread,
Mar 14, 2008, 2:03:28 PM3/14/08
to
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


--
Best regards,
Michal [Microsoft Outlook MVP]

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

April

unread,
Mar 18, 2008, 9:51:31 AM3/18/08
to
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?


"Michal [Outlook MVP]" <mich...@codetwo.com> wrote in message
news:e8HZw3fh...@TK2MSFTNGP02.phx.gbl...

0 new messages