Quantcast
Channel: Office 2013 and Office 365 ProPlus - IT Pro General Discussions forum
Viewing all articles
Browse latest Browse all 14306

Office 2013 APP - Get word, sentence or paragraph from word without selecting but with use of the cursor

$
0
0

Hello, I ‘m not a developer, but I would like to know some things about it. Hope this is the right place for these questions.

I would like to create a task pane app for Word 2013with visual studio, so I’m in my *.js file and I see the the function below, which is great:

 

 function getDataFromSelection() {

      //  Office.context.document.getSelectedDataAsync(Office.CoercionType.Text,

               Office.context.document.

 

In this function you have to select the text.

 

Is there also a function that will capture a word, sentence or whole paragraph before the cursor? or where the cursor is in? And you don't have to select the word, sentence or paragraph ( so based on the place of the cursor)?

Thanks,

Mark



Viewing all articles
Browse latest Browse all 14306

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>