Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically remove group from Microsoft Word ribbon

Tags:

c#

ms-word

vsto

I've created a Microsoft Word Office 2010 VSTO add-in and am looking for a way to programmatically remove a specific group from the ribbon when the add-in launches. At a later stage users should be able to re-add this group using Customize Ribbon functionality in Word:

enter image description here

There is functionality to toggle the visibility of a group but if I do this attempts to make the group visible again using Customize Ribbon fail:

groupName.Visible = false;

I've searched quite a bit on this topic but can't find anything helpful with regards to removing ribbon groups, any advice would be great!

like image 740
Denys Wessels Avatar asked Nov 04 '22 16:11

Denys Wessels


1 Answers

It appears that adding and removing groups in VSTO add-ins is reserved for inner workings of Microsoft Word. More info on this topic can be found here

The only solution close to what I'm lookin for is to have a control on the ribbon(toggle button or checkbox) which set's the visibility of the group

like image 71
Denys Wessels Avatar answered Nov 09 '22 23:11

Denys Wessels