Ribbon button does not fire the event set by onAction when clicked

I developed an add-in for Outlook 2010, where I try to fire (or rather catch) an event that fires when a button is clicked, as shown in this article . I aimed at the correct XML (as changes on it are visible on a tape). However, the event I'm trying to catch is either not fired at all, or (more likely) fired differently from what I was listening (listening?).

I also tried following the MSDN link here , here, and mostly here . To no avail, though ... I wonder if this is due to information about the "redistribution".

Here's the markup.

<tab idMso="TabMail"> <group id="group1" label="CRMK"> <button id="MyId" onAction="Button_Click" label="Do me!" size="large" /> </group> <group id="group2" label="group2"> <button id="button1" label="button1" showImage="false" /> </group> </tab> 

And the code looks like this.

 private void Button_Click(Object sender, RibbonControlEventArgs eventArgs) { MessageBox.Show("Button clicked..."); } 

What am I missing? How can I debug such a thing?

+7
source share
1 answer

This is because of your signature. This is not true for tape objects. It should be next.

 public void Button_Click(Office.IRibbonControl control){ ... } 
+9
source

All Articles