R
Richard
This is the form for the File as;
Here is the code from the form on this MS Help and Support page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;291144
this is the code (see below) for just one of the five buttons, the Company
Last, First. I want to tweak the code to do Company First Last so that it
shows- File As :
Company
First Last
or, if there is no company associated with that contact, to show First
Last.
in my contacts. (I use the "address cards" view)
Code as follows:
----------------------------------------------------------------------------
--
Case "Company (Last, First)"
MyItem.FileAs = MyItem.CompanyName
If MyItem.LastNameandFirstName <> "" Then
If MyItem.FileAs <> "" Then
MyItem.FileAs = MyItem.FileAs & " (" & _
MyItem.LastNameAndFirstName & ")"
Else
MyItem.FileAs = MyItem.FileAs & _
MyItem.LastNameAndFirstName
End If
End If
----------------------------------------------------------------------------
-----------------------------
I have tried several attempts to either get an error or on one attemp I got
the first part of the code to work but any contact that had no company
associated with it was shown blank. (PS the parenthesis is as is from the
code I copied)
Here is the code from the form on this MS Help and Support page:
http://support.microsoft.com/default.aspx?scid=kb;en-us;291144
this is the code (see below) for just one of the five buttons, the Company
Last, First. I want to tweak the code to do Company First Last so that it
shows- File As :
Company
First Last
or, if there is no company associated with that contact, to show First
Last.
in my contacts. (I use the "address cards" view)
Code as follows:
----------------------------------------------------------------------------
--
Case "Company (Last, First)"
MyItem.FileAs = MyItem.CompanyName
If MyItem.LastNameandFirstName <> "" Then
If MyItem.FileAs <> "" Then
MyItem.FileAs = MyItem.FileAs & " (" & _
MyItem.LastNameAndFirstName & ")"
Else
MyItem.FileAs = MyItem.FileAs & _
MyItem.LastNameAndFirstName
End If
End If
----------------------------------------------------------------------------
-----------------------------
I have tried several attempts to either get an error or on one attemp I got
the first part of the code to work but any contact that had no company
associated with it was shown blank. (PS the parenthesis is as is from the
code I copied)