Reputation: 11
How can i get the text in range from the current location of the cursor till the end of the file? I use JavaScript Word api.
Upvotes: 1
Views: 220
Reputation: 11
Found a solution:
const doc = context.document;
const originalRange = doc.getSelection();
originalRange.load("text");
await context.sync();
var txt = originalRange.text;
Upvotes: 0