【问题标题】:Error Loading Word Add-in Eventually Works After Retry & Start重试和启动后,加载 Word 插件最终会出错
【发布时间】:2018-02-23 15:48:19
【问题描述】:

我的加载项在 Windows 上使用 Word 正确加载,但通过 Word Online 显示加载错误(使用 Chrome、Firefox 和 Edge 测试)即使单击提示按钮最终加载加载项并且一切都按预期工作。这是我在加载使用页面 (https://office.flexxlegal.com/Home/Usage) 的加载项中看到的:

  1. 页面加载在任务窗格中,带有灰色叠加和加载动画
  2. 接收加载项错误消息 - 出现问题,我们无法启动此加载项。请稍后再试或联系您的系统管理员。
  3. 点击重试按钮
  4. 页面再次显示在任务窗格中,带有覆盖和加载动画
  5. 接收加载项错误消息 - 此加载项可能无法正确加载,但您仍然可以尝试启动它。
  6. 点击开始按钮
  7. 页面加载完毕,一切正常

以下是应用清单中与他的控件相关的部分:

<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 页面。对问题可能是什么或我将如何确定问题有任何见解?

谢谢, 瑞恩

【问题讨论】:

  • 欢迎来到 Stack Overflow!由于您是新来的,我建议您阅读"How do I ask a good question?" 以获取一些提示。您的问题缺乏足够的细节来帮助社区帮助您。如果不深入了解您的代码,这里就没有什么可做的了。
  • 嗨,Marc - 我不确定什么代码会有所帮助...存在问题的加载项部分是一个任务窗格,它只是加载静态 HTML 页面并体验上述内容问题。
  • 没有看到该页面和支持/隐藏该页面的代码,就不可能确定出了什么问题。
  • 使用清单中的代码和正在加载的页面上的详细信息进行编辑。

标签: office-addins word-addins office-store


【解决方案1】:

在加载网页后,没有代码隐藏,没有 javascript,只有一个静态 HTML 页面

这是你的问题。您的加载项页面必须引用 office.js 库并包含 Office.initialize 处理程序。

我建议查看文档以了解有关 Office Web 加载项如何工作的说明:Understanding the JavaScript API for Office

【讨论】:

    猜你喜欢
    • 2018-04-26
    • 2014-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-31
    • 1970-01-01
    • 2014-07-14
    • 1970-01-01
    相关资源
    最近更新 更多