How can I get index of a word or sentence when using Document.Words.
Consider the following code snippet:
The code will run on below paragraph.
A quick brown fox jumps over a lazy dog. The dog was sitting beside the tree and the tree was on the bank of a river.
If the user enters "sitting", a MsgBox should show the index of word "sitting" and the sentence in which the word "sitting" appears.
Please help.
Consider the following code snippet:
Code:
UserSelection = InputBox("Enter a word")
For Each LookupWord in Document.Words
Next
The code will run on below paragraph.
A quick brown fox jumps over a lazy dog. The dog was sitting beside the tree and the tree was on the bank of a river.
If the user enters "sitting", a MsgBox should show the index of word "sitting" and the sentence in which the word "sitting" appears.
Please help.