Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot remove custom ribbon controls from quick access toolbar (QAT) menu

I have a custom addin for Word (could also be for Excel).

The addin has a ribbon with multiple groups and multiple controls (buttons) within them.

This is an ongoing project and some of the ribbon buttons are for users, and some are for testing/development purposes.

When I send the product to the client I only show certain buttons. I want the testing buttons to be completely invisible/inaccessible. I Have tried setting the testing buttons/groups to visible = false.

This works, in the sense that the buttons do not appear on the ribbon, but if the user goes to Word's quick access toolbar > "More Commands" > "Choose Commands From" dropdown and selects my custom addin...

Then the user can see all of my buttons. Even the ones with no label.

I have tried looping the controls in the ribbon load method and setting the testing controls to enabled = false, locked = true, generatemember = false, but none of these hide the buttons from the QAT menu. I also tried control.Dispose() - no joy.

Is there anyway to set the properties of a ribbon button such that it is completely invisible and inaccessible to the user in the QAT??

Many thanks

like image 985
winstonwinston Avatar asked Aug 16 '16 12:08

winstonwinston


1 Answers

Set the ApplicationMode.

Button CommandName='cmdExportMetadata' ApplicationModes='1'

Please see the below link too : https://msdn.microsoft.com/en-us/library/windows/desktop/dd940486(v=vs.85).aspx

https://msdn.microsoft.com/en-us/library/windows/desktop/ee264330(v=vs.85).aspx

like image 86
FakeisMe Avatar answered Sep 28 '22 00:09

FakeisMe