Search code examples
apioutlook-addinadd-inoffice-jsoutlook-restapi

Looking for Outlook API that works in the same way as 'SearchREsults.item.select' for Office API or 'WordEditor' for VSTO


I'm working on office Add-in for Outlook and need to select the text in the body of the message.

Here is the way how it's can be done with

  1. word/excel Office API -searchResults.items[0].select('Select')
  2. VSTO -mailItem.GetInspector.WordEditor.Application()

Could you please advice the way to implement the same functionality, but using Outlook API or any other way that can be used in Outlook office add-in?


Solution

  • You can use item.getSelectedDataAsync API. The link is below

    https://dev.office.com/reference/add-ins/outlook/1.6/Office.context.mailbox.item?product=outlook

    Thanks