【发布时间】:2017-07-04 01:26:54
【问题描述】:
我正在使用 Office JS 开发 Word 插件。
感谢之前的回答,我发现我可以通过以下方式在 Word 中打开一个新文档:
context.application.createDocument().open();
不过,这似乎只适用于桌面版 Office。
如果我在在线版本中尝试相同的插件,我会收到错误:
Sorry, this function isn’t available. Perform a runtime check on the Office add-in to find out whether the feature is supported by the host
如何以编程方式确定该功能是否可用,以便在不可用时使插件默认为不同的行为?
另外,有没有关于createDocument 函数的文档? (我用谷歌搜索并找不到任何东西)。
【问题讨论】:
标签: ms-office office365 office-js office-addins