【发布时间】:2020-04-22 15:36:37
【问题描述】:
我正在尝试开发一个 office-js 单词插件来增强右键菜单,但是当我在清单中添加元素时。 Word 无法再读取/访问清单。 所以 OfficeMenu 对我不可用。
我可以检查什么?
非常感谢
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuText">
<Control xsi:type="Menu" id="ContextMenu2">
<Label resid="CommandGroup.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Items>
<Item id="Item1">
<Label resid="IdItem1"/>
<Supertip>
<Title resid="IdItem1"/>
<Description resid="TaskpaneButton.Label"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint> ```
【问题讨论】:
-
清单是否有效?见docs.microsoft.com/en-us/office/dev/add-ins/testing/…。另外,Office 无法访问清单是什么意思?出了什么问题以及导致它的步骤是什么?
-
嗨 Rick,是的,运行 npm run validate 不会给出任何错误,因此清单对命令有效。但是,一旦我想在 Word 中查看结果,我就会收到一条错误消息,指出组件(清单)不存在或已被移动 /deleted 。如果我删除有关菜单的行,那么它会再次起作用。
标签: office-js office-addins office-js-helpers