2

Is there an Outlook/Word add-in api to highlight a section of the text, without really modifying the underlying html of the email or the Word document? The purpose is to notify the user about a relevant section in the text.

Nathan B
  • 1,625
  • 1
  • 17
  • 15

1 Answers1

2

Currently the feature to highlight the part of text without updating the html is not a part of the Outlook Office.js API set. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process. You can check contextual add-in which highlights the text on which Add-ins is applicable. Check if it can be used for your usecase?

  • Another option is to have an API that simulates a user selection of a range. Do you have a "selectRange" api? – Nathan B Jul 15 '20 at 07:03
  • 1
    Unfortunately Outlook does not support selectRange api currently. Check [this post](https://stackoverflow.com/questions/61305382/how-do-i-select-a-range-and-change-font-color-of-specific-words-in-outlook-web-a) for more info. – Outlook Add-ins Team - MSFT Jul 16 '20 at 08:54
  • But I see that add-ins do that, for example the Grammarly addin, highlights a word - what API does it use to achieve that goal? I see that it adds the class Selected to a word. Is there an API to add a class to range? – Nathan B Jul 19 '20 at 19:40
  • For Outlook, Grammarly is a COM Add-in and not a web Add-in. – Outlook Add-ins Team - MSFT Jul 20 '20 at 07:37
  • @ Outlook Add-ins Team - MSFT no, the Grammarly add-in for Word (the online version at https://onedrive.live.com/ ), and other company add-in, are able to select a text. How? – Nathan B Feb 26 '21 at 17:34
  • 1
    Outlook and Word have different addin APIs. Are you trying to build an Outlook addin or a Word addin? Outlook addin currently does not support "selectRange" api but you can always request for a feature on our user-voice page. – Outlook Add-ins Team - MSFT Mar 04 '21 at 19:52