B
Bernie
Everyone has been very nice in this group and provided some great help.
This posting is to summarize a few items of note that were helpful in
our project. This information comes from the actual coding that worked
on our project and from experiments we ran with the code.
The connection between an Address List and a Contact Folder is not
clearly outlined in most documentation we could find.
First, not all Contacts Folders have an Address list associated with
them. The address list for a particular Contact Folder is created when
under that Contact Folder's properties under the "Outlook Address Book"
tab the "Show this folder as e-mail address book" is checked.
Furthermore, the name used there can be changed to be anything. It
does default to be the same as the name of the Contact Folder itself.
But there is no reason to assume this is true. Some commentaries
suggest that the names are the same but they don't have to be.
The connection between the list and the folder can be found in the
"ShowAsOutlookAB" property and the "AddressBookName".
For our programs to properly process contact folder entries and their
associated email addresses we must have...
1) "DefaultItemType" is "olContactItem"
2) "ShowAsOutlookAB" is "true"
3) Able to located "AddressBookName" in the "AddressLists".
There is some conflicting data on finding Address Books.
Folders can be nested (contact folders included). However Address
Books are in a simple linear list. So for point 3, using the
"AddressBookName" value a simple search can locate the Address list for
that contact folder. The AddressList object can then be saved and you
now have access to both the contact folder and the address list the
system has generated from this folder.
It also seems that the value for "AddressBookName" is always set even
if "ShowAsOutlookAB" is not "true". Outlook sets that value to the
string "Contacts". Which in most cases is always there. This can lead
to some confusion, thinking there is an address list entry for an email
address in a contacts folder when in reality there is none. (For
example the algorithms for the "Resolve" and "ResolveAll" methods
report "Resolved" even if there is no existing entry for that email
address...)
Anyhow, hope this helps someone and saves some time. It sure helped us
out once we understood this.
Thanks again for the all the help.
Bernie
This posting is to summarize a few items of note that were helpful in
our project. This information comes from the actual coding that worked
on our project and from experiments we ran with the code.
The connection between an Address List and a Contact Folder is not
clearly outlined in most documentation we could find.
First, not all Contacts Folders have an Address list associated with
them. The address list for a particular Contact Folder is created when
under that Contact Folder's properties under the "Outlook Address Book"
tab the "Show this folder as e-mail address book" is checked.
Furthermore, the name used there can be changed to be anything. It
does default to be the same as the name of the Contact Folder itself.
But there is no reason to assume this is true. Some commentaries
suggest that the names are the same but they don't have to be.
The connection between the list and the folder can be found in the
"ShowAsOutlookAB" property and the "AddressBookName".
For our programs to properly process contact folder entries and their
associated email addresses we must have...
1) "DefaultItemType" is "olContactItem"
2) "ShowAsOutlookAB" is "true"
3) Able to located "AddressBookName" in the "AddressLists".
There is some conflicting data on finding Address Books.
Folders can be nested (contact folders included). However Address
Books are in a simple linear list. So for point 3, using the
"AddressBookName" value a simple search can locate the Address list for
that contact folder. The AddressList object can then be saved and you
now have access to both the contact folder and the address list the
system has generated from this folder.
It also seems that the value for "AddressBookName" is always set even
if "ShowAsOutlookAB" is not "true". Outlook sets that value to the
string "Contacts". Which in most cases is always there. This can lead
to some confusion, thinking there is an address list entry for an email
address in a contacts folder when in reality there is none. (For
example the algorithms for the "Resolve" and "ResolveAll" methods
report "Resolved" even if there is no existing entry for that email
address...)
Anyhow, hope this helps someone and saves some time. It sure helped us
out once we understood this.
Thanks again for the all the help.
Bernie