Outlook 2000: globally change the "file as" order of all contacts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I found instructions and code for globally changing the "file as" order for
all contacts at the following page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;291144&Product=out

I copy/pasted the code per the instructions. The code copied without any
line breaks or indents, so I put them back in. I keep getting an error
message "Invalid character Line No:73" I can't find any problems, and I
don't find any way to debug the code.
 
Here's the entire case, with line numbers.

69 Case "Last, First (Company)"
70 MyItem.FileAs = MyItem.LastNameAndFirstName
71 If MyItem.CompanyName <> "" Then
72 If MyItem.FileAs <> "" Then
73 MyItem.FileAs = MyItem.FileAs & " (" & _ MyItem.CompanyName
& ")"
74 Else
75 MyItem.FileAs = MyItem.FileAs & _ MyItem.CompanyName
76 End If
77 End If
 
That line has an underscore, the VBA continuation character, in the middle
of the line, not at the end. Either of these would be correct:

MyItem.FileAs = MyItem.FileAs & " (" & MyItem.CompanyName & ")"

MyItem.FileAs = MyItem.FileAs & " (" & _
MyItem.CompanyName & ")"

You'll need to fix a similar problem with statement 75.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
That was it. Thanks so much!
Shannon

Sue Mosher said:
That line has an underscore, the VBA continuation character, in the middle
of the line, not at the end. Either of these would be correct:

MyItem.FileAs = MyItem.FileAs & " (" & MyItem.CompanyName & ")"

MyItem.FileAs = MyItem.FileAs & " (" & _
MyItem.CompanyName & ")"

You'll need to fix a similar problem with statement 75.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top