Hi! 'oRng.Sentences(1).Select' works both in text and tables IF (according to my tests) there is more than one sentence in a paragraph. Note that Word has an unclear idea of a sentence, e.g.: "The book was written by J. Smith, ..." can be treated as two sentences: (1) "The book was written by J." and (2) "Smith, ..."
Keeping in mind the IF described above, you can also use:
oRng.Select
selection.Expand Unit:=wdSentence
Another method (although not a one-liner), which "doesn't care about" the IF, is:
selection.Extend
selection.Extend
selection.Extend
Note that three lines must be used: line 1 activates the extend function, line 2 extends the selection to the current word, line 3 extends the selection to the current sentence.
If you wanted to select the current paragraph, the fourth 'selection.Extend' would have to be added.
|