office.js displayDialogAsync无法与displayInIframe一起使用:true

时间:2018-04-26 07:34:23

标签: typescript office-js

当我尝试使用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时,它正常工作。你能给我一个解决方案吗?

1 个答案:

答案 0 :(得分:0)

如果我关闭对话框然后通过加载项重新打开它,则会出现同样的错误。我将它与displayInIframe一起使用:true,虽然它正常工作,但是这个标志设置为false。

在谷歌浏览器版本66.0.3359.181上使用Outlook Outlook加载项,在Mac OS X上获得El Capitan版本10.11.6(15G18013)

api调用的结果因result.error而失败:{\\“name \\”:\\“内部错误\\”,\\“message \\”:\\“发生了内部错误。 \\”,\\ “代码\\”:5001}