我尝试将加载项命令按钮设置为仅在有附件时才可见。有可能吗?
我预计我可以添加"规则"节点到"控制"节点,但无法完成:
<Control xsi:type="Button" id="hButton2">
<Label resid="hButton2Label" />
<Supertip>
<Title resid="hButton2SupertipT" />
<Description resid="hButton2SupertipD" />
</Supertip>
<Icon>
<bt:Image size="16" resid="h-button2-icon-16" />
<bt:Image size="32" resid="h-button2-icon-32" />
<bt:Image size="80" resid="h-button2-icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="hSourceLocation2"/>
</Action>
<Rule xsi:type="ItemHasAttachment" /> <-------------------- won't work
</Control>
答案 0 :(得分:1)
Rule元素仅适用于CustomPane扩展点,无法在Control元素中定义:https://dev.office.com/docs/add-ins/outlook/manifests/define-add-in-commands。另见:https://dev.office.com/docs/add-ins/outlook/manifests/activation-rules