Article ID: 173588
Article Last Modified on 2/12/2007
Sub ChangeEmailAddress()
' The Outlook object library must be referenced.
Dim ol As New Outlook.Application
Dim myContact As ContactItem
' Create a new Contact item.
Set myContact = ol.CreateItem(olContactItem)
myContact.FullName = "Joe Smith"
' This will properly set the email address.
myContact.Email1Address = "joe@abc.com"
myContact.Save
' This will not change the email address.
myContact.Email1Address = "mike@xyz.com"
myContact.Save
' The email address appears to be changed here...
MsgBox myContact.Email1Address
' ...but it is not actually changed.
myContact.Display
End Sub
Note that programmatically, the Email1Address will properly return the
second e-mail address (mike@xyz.com) until the first e-mail address is
resolved.
169750 OL97: How to Programmatically Resolve a Contact's E-mail Address
Additional query words: OutSol OutSol97
Keywords: kbbug kbcode kbpending kbprogramming KB173588