RobPethi
RobPethi

Reputation: 571

Get the currently highlighted text in a OneNote Document

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

Answers (1)

Rick Kirkham
Rick Kirkham

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

Related Questions