Programmatically updating Outlook
Programmatically updating Outlook
Author
Discussion

gopher

Original Poster:

5,160 posts

289 months

Thursday 10th February 2005
quotequote all
I'm writing app which will contain contacts - these will originate from Outlook contacts and this is fine - pulling contacts from is not an issue.

If a contact is changed within the app there will be an option to update outlook contacts.

I can not find anyway of uniquely identifying a contact that comes from outlook. It appears that when updating a contact I can't pull a contact from outlook based on say a unique id or key but have to loop through all of them until I get a match on e.g surname, first name.

This is obviously open to error, so my question is, does anyone know a way of uniquely identifying an Outlook contact?

Cheers

Paul

pdV6

16,442 posts

291 months

Thursday 10th February 2005
quotequote all
The Name and Address properties of an AddressEntry object are updateable.

The AddressEntry has a read-only ID property, so it should just be a case of you managing the correlation between the list of contacts in your app and the IDs of the AddressEntry items in the AddressEntries collection (which in itself is a property of Outlook's AddressList class).

malman

2,258 posts

289 months

Thursday 10th February 2005
quotequote all
I haven't done any development on outlook stuff but I would expect each item to have a unique key somewhere. Alternatively you can make your own as a contact record has some user defined fields that you can store a UID in.

gopher

Original Poster:

5,160 posts

289 months

Thursday 10th February 2005
quotequote all
pdV6 said:
The Name and Address properties of an AddressEntry object are updateable.

The AddressEntry has a read-only ID property, so it should just be a case of you managing the correlation between the list of contacts in your app and the IDs of the AddressEntry items in the AddressEntries collection (which in itself is a property of Outlook's AddressList class).


I think that is exactly what I'm looking for

Cheers

Paul

Tripps

5,814 posts

302 months

Thursday 10th February 2005
quotequote all
Out of curiosity, have you done anything to get past the address book protection dialog, or do you just allow access from your application for long enough to get the job done?

pdV6

16,442 posts

291 months

Thursday 10th February 2005
quotequote all
Tripps said:
Out of curiosity, have you done anything to get past the address book protection dialog, or do you just allow access from your application for long enough to get the job done?

I'd be interested in that, too.

Not sure if I'd be able to implement anything, though, as my app needs to be OL version independent and backwards compatible to OL98, which doesn't have this "feature"...

gopher

Original Poster:

5,160 posts

289 months

Thursday 10th February 2005
quotequote all
Only started looking at the address entry after Pete mentioned it and have done very little office integration previously. What's the (potential)issue here?

Cheers

Paul