problem to fire up an event

  • Thread starter Thread starter Stephane Gendron
  • Start date Start date
S

Stephane Gendron

I created a Com add-in and I have a problem to fire up an event.

I create a toolbar with some button that is displayed everytime that a new
inspector is launch.

But the problem is : If I open one item and I try to click the button
everything will execute correctly.

But if I open two item or more item...the button will stop to work on the
first item I open.
The button will only correctly work with the latest item opened.

I try to debug and I can see that the sub that is related to the click event
of this button is not fired up!!

Someone have an idea??

Thanks,

Steph
 
Use Google to search for "Inspector wrapper". You must have a wrapper class
for each open Inspector that is kept in a wrapper collection. In each class
you would declare separate buttons for the Inspector instantiated in that
class instance and would handle the button clicks in that class too. Each
button you create in the class must have a unique Tag property that is
different than any other button's Tag property so the Click event only fires
once.

You should also download the ItemsCB COM addin sample from the Resources
page at www.microeye.com to see an example of best practices for Outlook
addins. ItemsCB also has an Explorer wrapper that is similar to an Inspector
wrapper.
 
Back
Top