<P ID="edit" class=small>(Edited by JohnBF on 07-Apr-06 07:30. )</P>For posterity, and because I became obsessively anoyed with those useless X400 addresses in my Palm. An interesting artifact is that it for me it didn't change any address it couldn't resolve, and in my case this turned out to be all the employees who have either left the company but who I had not edited in or removed from Contacts, or who have address revisions since I added them to Contacts from the GAL.

EDIT: As I have learned to my chagrin, making these changes has trashed much of my autocomplete nickname file. I guess I have to take the bad with the good. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

Sub cvt_contact_from_X400_2_URL()
Dim strAddress As String
Dim lngI As Long
Dim intC As Integer, intL As Integer

With Outlook.Session.GetDefaultFolder(olFolderContacts)
For lngI = 1 To .Items.Count
With .Items(lngI)
If .Class = olContact Then
' edit string comparison to company exchange identifier
If CBool(InStr(1, .Email1Address, "/o=ABC/ou=Site1/cn=Recipients/cn=", vbTextCompare)) And .Email1AddressType = "EX" Then
strAddress = .Email1Address
intL = Len(strAddress)
For intC = intL To 1 Step -1
If Mid(strAddress, intC, 1) = "=" Then
.Email1Address = Right(strAddress, intL - intC)
.Save ' must save now for next step to stick
.Email1DisplayName = .FileAs ' if appropriate
End If
Next intC
End If
End If
End With
Next lngI
End With
End Sub