View Single Post
  #1  
Old October 27th 09, 12:49 PM posted to microsoft.public.outlook.program_addins
KarthikonIT via OfficeKB.com
external usenet poster
 
Posts: 14
Default OnButtonClick event in MSOutlook called twice.

Hi,
I m Creating a Plugin for MS OUtlook, I a few questions

Q. I have added Button to New email window(ie. the window that
is opened when an email is double clicked)

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.

DispEventAdvise & DispEventUnadvise are added in the constructor and
destructor of "BtnWrapper"& "INspector wrapper" class for resp. events.



Instance of the "BtnWrapper" class will be created with "INspector wrapper"
class.

Now my problem is when 2 emails are double clicked and opened in new window.
"OnButtonClick" event is called twice.




Note:
when n mails are double clicked & opened. "OnButtonClick" triggered n times.
Buttons is added only once in the toolbar.



Any clue to resolve this.

Thanks in Advance.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200910/1

Ads