如何在Office`Dialog API`中使用`Word.run(function(context){`

问题描述 投票:1回答:1

我正在使用Word AddIn开发,我想在Word.run(function (context) {中使用Dialog API,但我总是得到异常general exception内部服务器错误。没有其他消息。

错误:

调试信息:{“code”:“GeneralException”,“message”:“发生内部错误。”}

office-js word-addins
1个回答
2
投票

您无法在对话框中使用Word.run。

messageParent函数是可以在对话框中调用的仅两个Office API之一。另一个是Office.context.requirements.isSetSupported。 messageParent函数只能在与主机页面具有相同域(包括协议和端口)的页面上调用。

我从文档中获得了这些信息:Use the Dialog API

© www.soinside.com 2019 - 2024. All rights reserved.