我使用Office JS开发Word插件。Word Addin - 如何检查createDocument()函数是否可用?
由于以前的答案,我发现我可以做在Word中打开一个新的文档:
context.application.createDocument().open();
然而,这似乎只在办公室的桌面版本。
如果我尝试在网上版本相同的插件,我得到一个错误:
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
函数的一些文档? (我Google搜索,找不到任何东西)。
谢谢Michael! – EsPl