I have some bullets in a MS Word Document type wdListSimpleNumbering
, I am unable to find a way to select all the paragraphs between bullets u)
and v)
.
E.g. In the document, I have following bullets;
u) Company Introduction.
1st paragraph
2nd paragraph
3rd paragraph
v) Company Vision
Now I am looking a way to select the paragraphs between the bullets u)
and v)
.
With the following code; I can select the text with bullet u)
but not sure how to select range up till bullet v)
. Here is my code:
For Each oPara In ActiveDocument.Paragraphs
If oPara.Range.ListFormat.ListType = wdListSimpleNumbering And _
oPara.Range.ListFormat.ListString = "u)" Then _
oPara.Range.Font.ColorIndex = wdRed
oPara.Range.Select ' here I want to select paragraphs
Debug.Print (oPara)
End If
Next