Office.context.ui.displayDialogAsync引发5001内部错误 [英] Office.context.ui.displayDialogAsync throws 5001 Internal Error

查看:258
本文介绍了Office.context.ui.displayDialogAsync引发5001内部错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio项目模板创建一个新的Outlook Mail加载项,在这里我得到一个显示当前所选电子邮件属性的示例.

I'm creating a new Outlook Mail add-in using the Visual Studio project template, where I get a sample displaying properties of the currently selected email.

我添加了带有点击事件处理程序的按钮,以使用以下代码打开对话框:

I've added a button with a click event handler to open a dialog using this code:

  $('#clickMeButton').click(function () {
      Office.context.ui.displayDialogAsync('https://localhost/OutlookAddinTest/MessageDialog.html', {
          height: 40,
          width: 40,
          requireHTTPS: true
      }, function (result) {
          _dlg = result.value;
          _dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, dialogMessageReceived);
      });
  });

我正在使用Chrome中的Outlook Web客户端进行调试:

I'm debugging this using the Outlook web client in Chrome:

我不知道它是否与此错误有关,但是在加载网站之后,在单击clickMeButton之前,我可以看到以下错误:

I don't know if it's relevant for this error, but I can see the following error after the web site is loaded, before I click the clickMeButton:

osfruntime.js:13 Error while parsing the 'sandbox' attribute: 'ms-allow-popups' is an invalid sandbox flag.OSF.OsfControl._createIframeAndActivateOsfControl @ osfruntime.js:13

displayDialogAsync(...)函数不是应该用于Outlook Mail加载项吗?这可能是一个问题,因为它会在Outlook主HTML页面的上下文中加载另一个HTML页面.但这在Outlook桌面客户端中都不起作用.

Isn't the displayDialogAsync(...) function supposed to be used for Outlook Mail add-ins? It might be an issue because it would load another html page within the context of the main Outlook html page. But it doesn't either work in the Outlook desktop client.

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆