文档内容太多调动api删除报错

阅读次数 43

const DocumentRange = await this.instance.Application.ActiveDocument.GetDocumentRange() const End = await DocumentRange.End - 9 const selection = await this.instance.Application.ActiveDocument.ActiveWindow.Selection const range = await selection.Range
await range.SetRange(0, End)
await this.instance.Application.ActiveDocument.ActiveWindow.Selection.Delete(1)
wps实例 有文本 有表格 有图片
用上述方法清空实例时 会报错

0 Answers