Saving ContactItems Question

Joined
Nov 17, 2008
Messages
3
Reaction score
0
I am creating an application to synchronize a contacts folder in public folders with a contacts subfolders in the local contacts folder. If this is done manually in outlook and a contact already exists it gives you the option to update it, which is what I want to do for already existing contacts.

I am having trouble copying the contacts to the local folder though. This is what I have at the moment:

Code:
 'Update remaining contacts
 For i = 1 To PublicContacts.Items.Count
 Dim contact As Outlook.ContactItem = LocalContacts.Items.Add(Outlook.OlItemType.olContactItem)
 contact = PublicContacts.Items.Item(i)
 contact.Save()
 Next

But if this is creating a new contact I can't find it. If it worked properly the contact would be in the contacts folder, not the appropriate subfolder. When it works properly it should add the contacts to the appropriate folder, and if the contact already exists then update it.

How can I do this?

Thanks,
--Rikki
 
Back
Top