Multiple Inspector Instances w/Add-in

S

StevenBr

My Outlook add-in puts a toolbar with a button on the inspector, when the
user invokes a new message form.

This button gathers information about the message and logs it to a database.

However, I notice that the behavior is unpredictable if the user invokes
multiple inspectors simultaneously. Subsequent inspectors don't behave
properly; for instance, the second doesn't get the toolbar added at all, and
the third removes the toolbar from the first when it's opened (the
"newInspector" event checks for, and deletes the toolbar if it's there and
readds it).

The add-in is built using the sample format I found, with a "connect" and
"outaddin" class. Any ideas why the subsequent Inspectors don't behave as
expected?

Thanks!
 
S

StevenBr

I'm implementing your code and wonder if you have any recommendations for
checking if the commandbar already exists on the inspector. The only
solutions I've seen are basically trying to delete it, and if that throws an
error, just resume next into code to create it.

Thanks.
--
Steven Bras
Tessitura Network, Inc.


Ken Slovak - said:
You need an Inspector wrapper and each set of buttons should get created
using a unique Tag property so the buttons in one Inspector don't interfere
with other Inspectors. Look at the Inspector wrapper example in VB 6 at
http://www.slovaktech.com/code_samples.htm#InspectorWrapper for an example
of how to handle things.
 
K

Ken Slovak - [MVP - Outlook]

That's one option. You can use the FindControl methods from a CommandBar or
CommandBars objects, which is what I usually do.
 

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