在Outlook加载项中未初始化Office

问题描述

我有一个使用Yeoman Generator在React JS中创建的Outlook Web加载项。

在大多数情况下,外接程序都可以正常工作。但是有时,Office初始化不正确,并且加载项仅显示Spinner,并显示消息“请在加载加载项时等待...”。这将持续很长时间,除非我们单击新电子邮件并再次调用该加载项,否则该加载项将不会加载。

Office.onReady()
  .then(function () {
      isOfficeInitialized = true;
      userEmail=Office.context.mailBox.userProfile.emailAddress;
      userdisplayName=Office.context.mailBox.userProfile.displayName;
      appInsights.trackTrace({message:'Office JS loaded succesfully for ' + userdisplayName});
      render(App);
  })
  .catch(function (error) {
      appInsights.trackException("Error occured while loading Office JS "+error);
  })

现在此问题反复出现,并且我无法在日志中收集任何错误。 App Insights中仅显示成功消息。如何避免这种情况或如何找出导致加载项在某些情况下无法正确加载的根本原因?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)