2

I know how to add existing Office Ribbon items or groups to my custom ribbon using XML (using idMso tags) but how do I do this using the Visual Studio Ribbon (Visual Designer) technique?

Would really rather not have to build the entire thing using XML.

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
Bren Gunning
  • 390
  • 2
  • 4
  • 18

1 Answers1

1

In Ribbon Designer, you can access the ControlId which points to the idMSO used in Ribbon UI XML. More specifically, ControlId.OfficeId represents the idMSO property that contains the specific Office control identifier.

tools.Ribbon.RibbonTab tab = Globals.Factory.GetRibbonFactory().CreateRibbonTab();
tab.ControlId.OfficeId = "TabNewMailMessage";
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
  • This is code, not part of the designer. I don't see ControlId or idMso anywhere in the Properties of a group or button. It looks like this: imgur.com/NINLk – Chris Sep 04 '12 at 17:01
  • I agree with @Chris. The shown approach is available only for `tab` controls in the Ribbon Designer, not for groups or button.. – Cindy Meister Nov 09 '19 at 14:07