Address Book add-in wipes out autocomplete cache

M

michigander

I've built an add-in that creates a new address book, fills it with contacts
from an external source and gives the user the option to move these contacts
into thier Contacts folder (for synchronizing with a PDA). If the folder
already exists, the contents in the new address book are updated (adding new
and deleting missing items from the external source).

The Contacts folder is synchronized by deleting and replacing items based on
a Category name to preserve Contacts that are not from this source.

This process works fine but unfortunately raises havoc with the autocomplete
cache, at least for the contact items I am replacing. I can capture the .nk2
file, rename it and have the user close Outlook, replace the .nk2 file with
the renamed file and when Outlook is reopened the autocomplete cache is ok.
This is not a very pleasant process to go through on a regular basis, even if
I automate the file replacement to a single click because of the need to
close and reopen Outlook.

Is there anyway to programatically (C#) duplicate the rebuilding of the
autocomplete cache (select all contacts from desired source - send to new
message - ctlK - close without saving)?

TIA for any suggestions.
 
M

michigander

It is also possible I am using the wrong approach to keep the Outlook
contacts updated from the external source. The intention is for this to be
one-way only. Can anyone suggest a better way than delete and replace while
leaving other items in the contact folder that do not match the category
alone?
 
K

Ken Slovak - [MVP - Outlook]

If you don't replace the changed items then you have to go over every
property in the synch object to update the existing item, so I'd say your
choice would be a better one.
 

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