Load-on-demand COM add-in for Word doesn't unload consistently

C

Christine

My load-on-demand add-in written in VisualBasic.NET for Word loads and
unloads cleanly as long as I use the COM Add-in item of the Tools menu to
load and unload it.

However, if I leave the add-in in place when WOrd is shut-down, things do
not go so well. When Word is re-opened, a couple of things are wrong.

Regedit shows the add-in as connected (LoadBehavior is 9, not 8). However,
OnConnection was not called when Word started up, so the add-in is not
actually loaded. The COM Add-ins dialog accessed via the Tools menu gives
conflicting information. My add-in is checked as "loaded" (this seems to
directly reflect what the Word add-in Registry load behavior value says).
However, in the same dialog, "Load Behavior: Load on demand" is followed by a
"not loaded" status. (When things are working properly, the check mark and
the "loaded"/"not loaded" information in the dialog match.)
 
C

Christine

The question I meant to ask in the just-prior post is whether anyone can shed
some light on this behavior, and, in particular, suggest a work-around.
Clearly I can tell users of the add-in to unload using the Tools menu, but
would prefer to provide software that behaves properly in all circumstances.
(BTW, I'm working with Office 2003 and the corresponding Visual Studio with
tools for Office)
 

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