问题
Am writing an outlook add-in in c#. I would like to disable the "Permissions" button in the "Options" tab while composing a new email.
Am currently using Addin express for creating the outlook add-in
回答1:
You need to use command
tag with the getEnabled
attribute defined. For example:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<commands>
<command idMso="Permissions" getEnabled="OnGetEnabled" />
</commands>
</customUI>
You can repurpose built-in ribbon controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
The list of built-in control IDs can be found in the following documents:
- Office 2016 Help Files: Office Fluent User Interface Control Identifiers
- Office 2013 Help Files: Office Fluent User Interface Control Identifiers
来源:https://stackoverflow.com/questions/43579868/programmaticaly-disable-existing-button-in-outlook-compose-window-ribbon