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
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!
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...