以编程方式禁用 Outlook 撰写窗口功能区中的现有按钮 [英] Programmaticaly disable existing button in outlook compose window ribbon
问题描述
我正在用 C# 编写一个 Outlook 插件.我想在撰写新电子邮件时禁用选项"选项卡中的权限"按钮.
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.
我目前使用 Addin express 来创建 Outlook 插件
Am currently using Addin express for creating the outlook add-in
推荐答案
您需要使用定义了 getEnabled
属性的 command
标记.例如:
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>
您可以重新调整内置功能区控件的用途,请参阅 临时重新调整 Office Fluent Ribbon 上的命令的用途 了解更多信息.
You can repurpose built-in ribbon controls, see Temporarily Repurpose Commands on the Office Fluent Ribbon for more information.
可以在以下文档中找到内置控件 ID 的列表:
The list of built-in control IDs can be found in the following documents:
这篇关于以编程方式禁用 Outlook 撰写窗口功能区中的现有按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!