Home » excel » c# – VSTO Ribbon: How can I make the text "Custom Toolbars" disappear from the left of the Ribbon?

c# – VSTO Ribbon: How can I make the text "Custom Toolbars" disappear from the left of the Ribbon?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I’m using VSTO with Visual Studio 2015 and testing the add-in in Excel 2010. On the left side of my ribbon, there’s a text showing “Custom Toolbars”. How can I get rid of this text?

Solution: Thanks to @Cindy Meister insights, I went to the properties of the “OfficeRibbon” and clicked on “Tabs” properties. On “ControlIdType” (under “ControlId” option) I chose “Custom” instead of “Office” (which was the previous chosen option) and then the “Custom Toolbars” message disappeared.

How to&Answers:

This indicates that there is some other customization present besides your VSTO add-in. This customization probably comes from a pre-Ribbon version of Excel, where there were menus and toolbars. People and develpers could – and did – customize these quite frequently. When Office moved to the Ribbon UI in version 2007, these customizations were all dumped into the Add-ins tab on the Ribbon, which is shared.

As a developer you cannot control what appears in the Add-ins tab – it’s designed to be shared.

If you don’t want to share a tab then you should define your own, custom tab in the VSTO add-in. Probably, you’re using the Ribbon Designer? In that case, right-click in the Designer in the Ribbon tab area. From the context menu, choose Add Ribbon Tab.

Any Ribbon tabs you create in this manner will be specific to your VSTO add-in. No one else will be able to add things to it, or execute your controls.