user3111311
user3111311

Reputation: 8001

Is it possible to remove parts from the Ribbon, in VSTO Excel C# Document-Level Customizations?

Is it possible to remove parts from the Ribbon, in VSTO Excel C# Document-Level Customizations?

For example, I want to disable the Data Tools group in the Ribbon.

Upvotes: 0

Views: 730

Answers (1)

PetLahev
PetLahev

Reputation: 688

Sure, you should be able to do

  1. Create a new Excel Workbook project
  2. Right click on solution - Add item = Ribbon XML
  3. follow the steps in the newly generated class
  4. edit the generated Ribbon.xml file like this

<?xml version="1.0" encoding="UTF-8"?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> <ribbon> <tabs> <tab idMso="TabData" visible="false">
</tab> </tabs> </ribbon> </customUI>

When I run the project I can't see the Data tab in my Excel

Upvotes: 1

Related Questions