使用Office JavaScript API在Office 365中通过Base64创建文档失败咨询
关于Office 365网页版不支持通过Base64创建Word文档的问题
我使用以下代码在Word桌面版中可通过Base64字符串创建新文档,但在Office 365网页版中无法运行,报错信息为:
The action isn't supported by Word in a browser
想咨询该功能是否暂不支持Office 365网页版?
async function CreateNewDoc(event) { try { await Word.run(async (context) => { // Use the Base64-encoded string representation of the selected .docx file. const externalDocument = base64; var externalDoc = context.application.createDocument(externalDocument); await context.sync(); externalDoc.open(); event.completed(); await context.sync(); }); } catch (error) { event.completed(); console.error(error); } }
附报错截图:
内容的提问来源于stack exchange,提问作者user22905514
相关产品推荐
相关产品推荐

