有条件地 enable/disable 按钮控件?
Conditionally enable/disable button control?
我查看了 https://dev.office.com/reference/add-ins/manifest/control 上的文档,但找不到任何内容。
除非满足特定条件,否则我想禁用功能区上的按钮。条件是所选邮件项上存在自定义 属性。
能做到吗?
重要更新:
Enabling and Disabling Add-in Commands is now available in Preview for Excel. As part of AddinCommands 1.1,此功能应该会在未来的所有 Office 产品中可用。
旧答案:
Can it be done?
没有。
Add-in commands for Outlook doesn't support dynamic enabling/disabling ribbon items. Activation rules 用于 Outlook 加载项的上下文类型,目前 不是 推荐的编写加载项的方式,Office 商店不接受它们。
Add-in commands for Excel, Word, and PowerPoint 也不支持动态 enabling/disabling 功能区项目。
根据清单 Control element 上的文档,可用控件 none 具有 "enable/disable" 属性或标记。
如果这是您希望在即将发布的版本中看到的内容,您可以 post/upvote 在 https://officespdev.uservoice.com/
提出您的建议
我查看了 https://dev.office.com/reference/add-ins/manifest/control 上的文档,但找不到任何内容。
除非满足特定条件,否则我想禁用功能区上的按钮。条件是所选邮件项上存在自定义 属性。
能做到吗?
重要更新:
Enabling and Disabling Add-in Commands is now available in Preview for Excel. As part of AddinCommands 1.1,此功能应该会在未来的所有 Office 产品中可用。
旧答案:
Can it be done?
没有。
Add-in commands for Outlook doesn't support dynamic enabling/disabling ribbon items. Activation rules 用于 Outlook 加载项的上下文类型,目前 不是 推荐的编写加载项的方式,Office 商店不接受它们。
Add-in commands for Excel, Word, and PowerPoint 也不支持动态 enabling/disabling 功能区项目。
根据清单 Control element 上的文档,可用控件 none 具有 "enable/disable" 属性或标记。
如果这是您希望在即将发布的版本中看到的内容,您可以 post/upvote 在 https://officespdev.uservoice.com/
提出您的建议