Search code examples
ms-wordoffice-jsadd-inoffice-addinsword-addins

How to highlight words when using a Word add-in


I'm currently working on a Word add-in. In simple words, the tool searches for words in a dictionary and then proposes a definition. I would like to highlight all the words where for the add-in has a definition. The problem is when using the "highlight"-option of the Word API, it overwrites highlights of the user and makes changes to the "undo"-stack.

I think this is possible as I've saw an example of the Grammarly Word add-in: see this picture

Does anyone has an idea how to realize this?


Solution

  • This is currently not possible using Office JS APIs.

    The screenshot displays the capability of the Grammarly VSTO based add-in, which is able to display the proofing marks you see on the document. This capability is not yet available on Office JS.