使用这个api报错信息如下: 打印instance.Application直接undefined Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'GetDocumentRange')
js代码: await instance.ready(); const app = instance.Application;
// 获取全文区域
const DocumentRange = await app.ActiveDocument.GetDocumentRange();
// 获取指定区域的带格式 HTML 数据
const htmlInfo = await DocumentRange.GetHtmlData();
console.log(htmlInfo);