简体   繁体   中英

VSTO Ribbon: How can I make the text “Custom Toolbars” disappear from the left of the Ribbon?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM