Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

How to find index of word in selected text in Words collection in C#

$
0
0

In my application I am using this code for select first word from selected text in MS Word:

Globals.ThisAddIn.Application.Selection.Words[1].Select();

But how I find index of this word in Words collection of all words in document??

This code shows, how to find first word from collection of all words from document.

ActiveDocument.Words[1].Select; 



Viewing all articles
Browse latest Browse all 4350

Trending Articles



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