Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   inspector toolbar buttons get multiple events (http://www.outlookbanter.com/add-ins-outlook/94580-inspector-toolbar-buttons-get-multiple.html)

Saeed September 7th 09 12:15 AM

inspector toolbar buttons get multiple events
 
I am writing VSTO SE addin for outlook 2003 in C#. I am keeping reference to
all open inspectors using inspector wrapper class. When a newInspector event
occurs I add a new toolbar and a button to the toolbar (unless they are
already present, which never happens) . I also add a handler to the button
click event. The problem I am facing is that I am getting multiple button
click events when more than one inspector is open. Is there any standard way
of adding a toolbar and button to inspector so that only respective event is
called for an Inspector.

Ken Slovak - [MVP - Outlook] September 8th 09 04:43 PM

inspector toolbar buttons get multiple events
 
Make sure you use a unique Tag property for every button you add.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Saeed" wrote in message
...
I am writing VSTO SE addin for outlook 2003 in C#. I am keeping reference
to
all open inspectors using inspector wrapper class. When a newInspector
event
occurs I add a new toolbar and a button to the toolbar (unless they are
already present, which never happens) . I also add a handler to the button
click event. The problem I am facing is that I am getting multiple button
click events when more than one inspector is open. Is there any standard
way
of adding a toolbar and button to inspector so that only respective event
is
called for an Inspector.



bustanji83 September 27th 09 12:25 PM

inspector toolbar buttons get multiple events
 

can you please write the code to add button for active inspector

"Saeed" wrote:

I am writing VSTO SE addin for outlook 2003 in C#. I am keeping reference to
all open inspectors using inspector wrapper class. When a newInspector event
occurs I add a new toolbar and a button to the toolbar (unless they are
already present, which never happens) . I also add a handler to the button
click event. The problem I am facing is that I am getting multiple button
click events when more than one inspector is open. Is there any standard way
of adding a toolbar and button to inspector so that only respective event is
called for an Inspector.


Ken Slovak - [MVP - Outlook] September 28th 09 03:05 PM

inspector toolbar buttons get multiple events
 
I'm not going to write your code for you. There are plenty of samples on the
Office Developer Web site and at www.outlookcode.com that show how to do
that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"bustanji83" wrote in message
...

can you please write the code to add button for active inspector

"Saeed" wrote:

I am writing VSTO SE addin for outlook 2003 in C#. I am keeping reference
to
all open inspectors using inspector wrapper class. When a newInspector
event
occurs I add a new toolbar and a button to the toolbar (unless they are
already present, which never happens) . I also add a handler to the
button
click event. The problem I am facing is that I am getting multiple button
click events when more than one inspector is open. Is there any standard
way
of adding a toolbar and button to inspector so that only respective event
is
called for an Inspector.




All times are GMT +1. The time now is 05:30 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com