Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community

Office.js Word highlight text

Office.js Word highlight text



 Nov 22 2021
1 Comments (1 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).

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.