Why not add a RibbonTab to multiple, default Ribbons?

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

Why not add a RibbonTab to multiple, default Ribbons?
why can't IdMso be multi-valued? 
aweber




Posts: 83
Joined: 2013-11-21
As per http://www.add-in-express.com/forum/read.php?PAGEN_1=1&FID=5&TID=9052, I understand I should copy the exact same RibbonTab multiple times in my project just to include the same items on multiple, default tabs (even within the same Office application)??? This would require a lot of copy-and-paste code for event handlers, and much more maintenance if/when debugging and updating that code.

Why can't the ADXRibbonTab control allow for multiple IdMso values and generate the ribbon tab in the same way it detects where the tab should go now, except for multiple tabs (if specified)? We are already given the context details as per the Developer's Guide, so we can handle different functionality within the events if we need to.

Thanks for any options that may be more recently available than the original forum thread.

-AJ

EDIT:
Regardless of this limitation, is it at least possible to re-use the one ADXRibbonGroup that I need in each of these Ribbons? Can I reference the one group for multiple ADXRibbonTab's?
Posted 29 Jan, 2014 11:31:37 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello AJ,

aweber writes:
Can I reference the one group for multiple ADXRibbonTab's?


No. In the Ribbon API the Id property is used to identify controls. This means you cannot use the same controls on different tabs. In particular, copying controls is a wrong way as this creates duplicated Ids.

When dealing with a built-in tab you must specify the IdMso property AND the Ribbons property, not just IdMso. To support a list of IdMso values in the IdMso property, Add-in Express should know beforehand what IdMso values may be used on this or that Ribbon (otherwise, you'll get an error message from Office). This complicates the logic behind the component a bit. What is more important is that Add-in Express would depend on Microsoft publishing the books mentioned in the section Referring to Built-in Ribbon Controls, see the PDF file in the folder {Add-in Express}\Docs on your development PC. JFYI, they published Office 2013 29-Jan-2013 and IdMso values for Office 2013 on 22-Mar-2013. If we allowed adding a list of IdMso values to the IdMso property, no Add-in Express user would be able to do anything during this period. Also note that if some IdMos values are missing in the official lists and if you get a missing IdMso, you would not be able to use it with Add-in Express.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Jan, 2014 06:34:44 Top