我的加载项在Windows上正确加载Word,但显示通过Word Online加载错误(使用Chrome,Firefox和Edge测试),即使单击提示按钮最终加载加载项,一切都按预期工作。这就是我在加载项中看到的只是加载使用页面(https://office.flexxlegal.com/Home/Usage):
以下是与其控件相关的应用清单的部分:
<Control xsi:type="Button" id="Flexx.Help">
<Label resid="Flexx.Help.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Flexx.Help.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Flexx.Help.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Flexx.qicon_16x16" />
<bt:Image size="32" resid="Flexx.qicon_32x32" />
<bt:Image size="80" resid="Flexx.qicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>FLTaskPane</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Flexx.Help.Url" />
</Action>
</Control>
<Resources>
<bt:Images>
<bt:Image id="Flexx.qicon_16x16" DefaultValue="https://office.flexxlegal.com/assets/img/Q16.png" />
<bt:Image id="Flexx.qicon_32x32" DefaultValue="https://office.flexxlegal.com/assets/img/Q32.png" />
<bt:Image id="Flexx.qicon_80x80" DefaultValue="https://office.flexxlegal.com/assets/img/Q80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Flexx.Help.Url" DefaultValue="https://office.flexxlegal.com/Home/Usage" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Flexx.Help.Label" DefaultValue="Getting Started" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Flexx.Help.Tooltip" DefaultValue="Click to view usage information to get started with this FlexxLegal add-in." />
</bt:LongStrings>
</Resources>
加载网页后,没有代码隐藏,没有javascript,只有静态HTML页面。是否可以了解问题的原因,或者我将如何确定问题?
谢谢, 莱恩
答案 0 :(得分:0)
加载网页后,没有代码隐藏,没有javascript,只有静态HTML页面
这是你的问题。您的加载项页面必须引用office.js
库并包含Office.initialize
处理程序。
我建议您查看文档以获取有关Office Web加载项如何工作的说明:Understanding the JavaScript API for Office。