0

When building a word add in I can use

var selectedRange = context.document.getSelection();

To get the currently selected text, is this possible with Onenote addins?

RobPethi
  • 551
  • 9
  • 27

1 Answers1

1

Yes. You can do this through the getSelectedDataAsync method of the Common Office JavaScript API. For details about using this API in OneNote, see accessing-the-common-api-through-the-document-object

Rick Kirkham
  • 9,038
  • 1
  • 14
  • 32