Office.js Word highlight text

Office.js Word highlight text
6

Upvotes

Upvote

 Nov 22 2021
2 Comments (2 New)
New

I'm attempting to implement functionality to highlight some text within a Word document. I don't want to modify the document, much like when you perform a search with Find and Replace feature (and text matching your search is highlighted in yellow).

Comments
Copper Contributor

Yeah I'm missing such a functionality as well. One could just select text programmatically and Word "highlights" it just like a user selects some text. But this enables only one portion of text at a time, since multiple selections are not supported.

Microsoft

This has been addressed with 1.7 requirement set: Word JavaScript API requirement set 1.7 - Office Add-ins | Microsoft Learn