通过一下代码 删除不干净 帮忙查看一下 或者提供别的删除方法
const DocumentRange = await this.instance.Application.ActiveDocument.GetDocumentRange()
const End = await DocumentRange.End - 9
console.log(End, this.endNum, '删除时比较两个值')
const selection = await this.instance.Application.ActiveDocument.ActiveWindow.Selection
const range = await selection.Range
await range.SetRange(0, End)
const _this = this
setTimeout(async() => {
await _this.instance.Application.ActiveDocument.ActiveWindow.Selection.Delete(1)
}, 500)
技术的同学 帮忙给看一下吧