Open adomasven opened 3 weeks ago
Thank you for letting us know about this issue. We will take a look shortly. Thanks.
Hi @adomasven , thanks for reaching us, I am investigating this issue and trying to find the solution. As a workaround, you may reacquire the field object instead of working on the same one to unblock yourself.
How would I reacquire the fields? This error also occurs if you acquire existing fields from context.document.body.fields
, or any other collection.
@adomasven I mean acquiring a new Field object after inserting Html instead of using the origin one, however, this may be hard if you have multiple fields in the document. I am working on the fix, and I will update once it starts to deploy.
@adomasven The fix is under deployment now. I will update once it is ready for test.
Word Online
Trying to set field code after inserting html for the field result range throws an error.
If in the above code you call
field.result.insertText()
instead offield.result.insertHtml()
no error is thrown.