![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I m Creating a Plugin for MS OUtlook, I a few questions I have added Button to New email window(ie. the window that is opened when an email is double clicked), but multiple times buttons are added since "Active Event" of Inspector is called again & again. How do I prevent multiple buttons from adding up in the "New email window"? Note: I have assigned unique tags to the command bar buttons so that event are not fired multiple times. Brief description of my architecut I have a class called "INspector wrapper" which implements the "Outlook:: InspectorEvents" for every new email a new Instance of this class will be created. I have a class called "BtnWrapper" which implments the "Office:: _CommandBarButtonEvents" for every button created a new Instance of this class will be created. I m adding the button in the "Active" event of Inspector. Thanks in Advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...ddins/200911/1 |
Ads |
#2
|
|||
|
|||
![]()
You can set a Boolean flag after you create your button UI the first time
and check that flag before trying to create the UI so you only do it once. -- 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 "KarthikonIT via OfficeKB.com" u54961@uwe wrote in message news:9eaa0e08eaae5@uwe... Hi, I m Creating a Plugin for MS OUtlook, I a few questions I have added Button to New email window(ie. the window that is opened when an email is double clicked), but multiple times buttons are added since "Active Event" of Inspector is called again & again. How do I prevent multiple buttons from adding up in the "New email window"? Note: I have assigned unique tags to the command bar buttons so that event are not fired multiple times. Brief description of my architecut I have a class called "INspector wrapper" which implements the "Outlook:: InspectorEvents" for every new email a new Instance of this class will be created. I have a class called "BtnWrapper" which implments the "Office:: _CommandBarButtonEvents" for every button created a new Instance of this class will be created. I m adding the button in the "Active" event of Inspector. Thanks in Advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...ddins/200911/1 |
#3
|
|||
|
|||
![]() Hi Ken, I have already tried that, it works some times, some times i don't see Button added to that or Multiple buttons added. I have declared a boolean variable as a member variable of "INspector wrapper" class which is created for every Inspector window opened. Anything else I could try for this.. Thanks for ur reply Ken. On Nov 5, 7:51*pm, "Ken Slovak - [MVP - Outlook]" wrote: You can set a Boolean flag after you create your button UI the first time and check that flag before trying to create the UI so you only do it once.. -- 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 "KarthikonIT via OfficeKB.com" u54961@uwe wrote in messagenews:9eaa0e08eaae5@uwe... Hi, I m Creating a Plugin for MS OUtlook, I a few questions I have added Button to New email window(ie. the window that is opened when an email is double clicked), but multiple times buttons are added since "Active Event" of Inspector is called again & again. How do I prevent multiple buttons from adding up in the "New email window"? Note: I have assigned unique tags to the command bar buttons so that event are not fired multiple times. Brief description of my architecut I have a class called "INspector wrapper" which implements the "Outlook:: InspectorEvents" for every new email a new Instance of this class will be created. I have a class called "BtnWrapper" which implments the "Office:: _CommandBarButtonEvents" for every button created a new Instance of this class will be created. I m adding the button in the "Active" event of Inspector. Thanks in Advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...dins/200911/1- Hide quoted text - - Show quoted text - |
#4
|
|||
|
|||
![]()
Hi,
I have already tried that it works some times, other times i don't see the button itself or multiple button. I created a bool variable as a member variable of "INspector wrapper" class which is created for every New email widow opened. Is there anything that I could try for this.. Thanks for the help. Ken Slovak - [MVP - Outlook] wrote: You can set a Boolean flag after you create your button UI the first time and check that flag before trying to create the UI so you only do it once. Hi, I m Creating a Plugin for MS OUtlook, I a few questions [quoted text clipped - 24 lines] Thanks in Advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...ddins/200911/1 |
#5
|
|||
|
|||
![]()
That should be all you need, I've never had a problem with that.
If you do need some sort of sanity check beyond that, use CommandBar.FindControl() to see if the control exists already before creating it again. -- 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 "KarthikonIT via OfficeKB.com" u54961@uwe wrote in message news:9eaa852f57454@uwe... Hi, I have already tried that it works some times, other times i don't see the button itself or multiple button. I created a bool variable as a member variable of "INspector wrapper" class which is created for every New email widow opened. Is there anything that I could try for this.. Thanks for the help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
inspector toolbar buttons get multiple events | Saeed | Add-ins for Outlook | 3 | September 28th 09 02:05 PM |
Multiple Toolbars being added/Multiple Buttons being added to Mail | Matt | Add-ins for Outlook | 5 | May 12th 09 07:06 PM |
Custom Image added to CommandBar Buttons | Andrew | Add-ins for Outlook | 2 | November 26th 08 02:26 PM |
adding coomand bar buttons to inspector window | Ram | Add-ins for Outlook | 4 | May 26th 06 06:16 AM |
how to add commandbarbutton to inspector window | Ram | Add-ins for Outlook | 0 | January 18th 06 03:18 PM |