执行下面的代码,就能复现此问题! TypeError: Cannot create property 'message' on string 'service unavailable'
let index = 0
const textInterveal = setInterval(() => {
if (index === 100) {
clearInterval(textInterveal)
setTimeout(async() => {
const aboutContent = `
相关事件我是文案`
const findResult = await this.instance.WordApplication().ActiveDocument.Find.Execute('我是文案1')
await this.instance.WordApplication().ActiveDocument.Find.ClearHitHighlight()
if (findResult) {
this.instance.Application.ActiveDocument.ActiveWindow.Selection.Range.PasteHtml({
HTML: aboutContent
})
}
}, 2000)
}
this.instance.Application.ActiveDocument.ActiveWindow.Selection.InsertAfter('我是文案' + index)
index++
}, 50)