![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
File As
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: File As
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] Share Outlook on the net without Exchange! April wrote: > 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 > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: File As
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]" <> wrote in message news:.gbl... > 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] > > > Share Outlook on the net without Exchange! > > > > April wrote: >> 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 |
|
|
|
#4 |
|
Newbie
Join Date: Nov 2008
Age: 35
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() |
Re: File As
While I share the lack of familiarity with Outlook macros, I am experiencing the same problem: the "File As" field for some of my Outlook '07 contacts is empty. What I find most interesting is that--when I view one contact in a table view--the "File As" field can be properly populated, but when I double-click the same contact, the "File As" field is suddenly empty and closing the contact produces the warning again. I'm pretty sure this "file as" field used to be populated. I've read that syncing sometimes causes this data to be removed. I sync between a Dell notebook and an iPhone.
Any advice would be appreciated. Thanks, Garth |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |