Changes to contact properties not being updated

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

Guest

I'm writing some code to automate the updating a some contact properties
(specifically, a user defined field of the date that the contact was last met
with).

Here's a sample of what I'm doing (for testing purposes, all that I'm doing
is updating the Birthday field with Now):

Set myContacts =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
Set CurContact = myContacts.Items(1)
CurContact.Birthday = Now()
Next

My code successfully makes it's way through my contacts list, and when I
step through, it appears that the last line works, because when I hover with
the mouse, CurContact.Birthday is updated with today's date.

HOWEVER, when I go back to the contact's folder in Outlook, the birthday is
not updated.

What is going on? Maybe the GetDefaultFolder method only creates a copy of
the Contacts folder, and so my changes are not being made in the actual
folder?

Thanks,
Kelly B
 
Am Thu, 8 Dec 2005 15:12:02 -0800 schrieb KellyB:

Kelly, you need to call the Save method after the update, before the Next
statement.
 
Back
Top