Duplicate Contacts

R

Richard

When I manually create a contact in Outlook XP, if the
contact already exists Outlook displays the 'Duplicate
Contact Deleted' dialog box. I can then choose the 'Update
new information from this contact to the existing one'
option, and Outlook takes care of the rest. When I create
new contacts via code, unfortunately this dialog box
doesn't appear and duplicate contacts are added.

Is there an object/method I'm not seeing that would force
this dialog box and/or functionality to work in code?

Here is some of the code (I'm using VB.Net, but you can
reply using VBA code if you need to).

Dim olAllENEWSContactItems As Outlook.Items =
olENEWSClientsFolder.Items

For Each objENewsContact In ENewsContacts 'This is an
array (structure) that has contacts to be added to
existing Contact folder.

olENewsContact = olENEWSClientsFolder.Items.Add
(Outlook.OlItemType.olContactItem)

With olENewsContact
.MessageClass = "IPM.Contact"
.LastName = objENewsContact.LastName
.FirstName = objENewsContact.FirstName
.Email1Address = objENewsContact.EmailAddress
.Save() 'This will create a duplicated contact.
End With

Next
 
K

Ken Slovak - [MVP - Outlook]

You would have to write your own duplicate checker which would check
for whatever properties you think are important for a match as a
potential dupe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top