【问题标题】:office.js displayDialogAsync could not work with displayInIframe: trueoffice.js displayDialogAsync 无法与 displayInIframe 一起使用:true
【发布时间】:2018-10-06 19:38:39
【问题描述】:

当我尝试在 typescript/react 下使用 displayDialogAsync 时:

Office.context.ui.displayDialogAsync(tIframeUrl, { height: 85, width: 99, displayInIframe: true }, asyncResult => {
  dialog = asyncResult.value;
  window.addEventListener("message", messageHandler, false);
});

我明白了:

asyncResult = OSF_DDA_AsyncResult {
    value: undefined, 
    status: "failed", 
    error: OSF_DDA_Error
}

An internal error has occurred. 5001

当我将标志设置为false 时,它工作正常。你能建议我一个解决方案吗?

【问题讨论】:

  • 你指的是哪个“旗帜”?
  • 我假设您使用的是 Office Online。您使用的是什么操作系统和浏览器?

标签: typescript office-js


【解决方案1】:

如果我关闭对话框一次然后通过加载项重新打开它,则会出现相同的错误。我将它与 displayInIframe: true 一起使用,而将此标志设置为 false 时它可以正常工作。

在 google chrome 版本 66.0.3359.181、Mac OS X El Capitan 版本 10.11.6 (15G18013) 上使用 Outlook 插件

api调用失败,result.error: {\\"name\\":\\"Internal Error\\",\\"message\\":\\"发生内部错误。 \\",\\"代码\\":5001}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-02
    • 1970-01-01
    • 2019-11-18
    • 1970-01-01
    • 2011-08-17
    • 2015-05-03
    • 1970-01-01
    相关资源
    最近更新 更多