Unable to handle ribbon click event

Add-in Express™ Support Service
That's what is more important than anything else

Unable to handle ribbon click event
I would like to add custom pages to "CoverPageInsertGallery" 
Niels Ziegler

Posts: 49
Joined: 2017-02-03
Using an adxRibbonCommand control I am trying to intercept a click on the Insert Cover Page on the Insert Tab. The msoId would be CoverPageInsertGallery.

But the action method is never called when I click the button.

private void adxCmdCoverPageInsertGallery_OnAction(object sender, IRibbonControl control, bool pressed, ADXCancelEventArgs e)
ADXRibbonGallery gallery = sender as ADXRibbonGallery;


If I set the command control "action target" to "NonActionControl", I get an event when the ribbon TAB is clicked for the first time, but the sender is not of type gallery but of type adxRibbonCommand.

Am I doing something wrong?
Posted 06 Feb, 2017 05:30:09 Top
Andrei Smolin

Add-in Express team

Posts: 14111
Joined: 2006-05-11
Hello Niels,

The Ribbon API doesn't let you intercepts clicking a built-in gallery and its items. As to the ADXRibbonGallery.OnAction event, you can only intercept it for a custom gallery.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Feb, 2017 09:21:04 Top