dotNET dotNET - 23 days ago 5
C# Question

How to add a group to multiple built-in Ribbon tabs (vsto)?

This is VS2010 + Office 2010 add-in. All I want is to add a button (or button group) to multiple built-in tabs. For example, my buttons should be available in both New Mail Message Ribbon and in New Appointment Ribbon. I have tried adding a new tab (in the Visual Designer) but that doesn't seem to work. The button group appears on the New Mail Message tab, but not on the Appointment tab. BTW, I'm using the following IDs:

TabNewMailMessage
and
TabAppointment
.

Answer

For anyone else pulling their hair about this, the only way I was able to see my group on both Appointment and New Mail Message tabs was by adding one Ribbon for each built-in tab, and then copy/pasting all of the UI and code from one Ribbon to the other. Make sure you choose proper RibbonType (a property of your Ribbon) for each built-in tab.

Comments