Reputation: 571
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?
Upvotes: 0
Views: 256
Reputation: 9784
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
Upvotes: 1