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

2

6

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

Archie answered 16/8, 2016 at 12:19 Comment(0)
B
2

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

Bezanson answered 24/8, 2016 at 6:46 Comment(0)
W
1

I would suggest you to create debug buttons dynamically. Define a constant variable like public constant string environment = "DEBUG"; and check it on start up

Wedded answered 26/8, 2016 at 7:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.