S
Steve
I'm having trouble selecting sentences in tables (I want to select the last
sentence). Suppose there are three sentences in a cell. Table has 1 row and
1 column for illustration:
Sub SelectSentences()
Dim i As Integer
i = ActiveDocument.Tables(1).Rows(1).Range.Sentences.Count
ActiveDocument.Tables(1).Rows(1).Range.Sentences(i).Select '(Selects
the entire row, i.e., all three sentences!)
ActiveDocument.Tables(1).Rows(1).Range.Sentences(i - 1).Select
'(Selects sentence 2)
ActiveDocument.Tables(1).Rows(1).Range.Sentences.Last.Select
'(Selects the end-of-row marker)
End Sub
Argh!! How in the world do I select ONLY the LAST SENTENCE???
Thanks. Steve
sentence). Suppose there are three sentences in a cell. Table has 1 row and
1 column for illustration:
Sub SelectSentences()
Dim i As Integer
i = ActiveDocument.Tables(1).Rows(1).Range.Sentences.Count
ActiveDocument.Tables(1).Rows(1).Range.Sentences(i).Select '(Selects
the entire row, i.e., all three sentences!)
ActiveDocument.Tables(1).Rows(1).Range.Sentences(i - 1).Select
'(Selects sentence 2)
ActiveDocument.Tables(1).Rows(1).Range.Sentences.Last.Select
'(Selects the end-of-row marker)
End Sub
Argh!! How in the world do I select ONLY the LAST SENTENCE???
Thanks. Steve