Determine Bullet List Style Using Word VBA

1.4k views Asked by At

I am currently trying to parse through a Word document which is full of bullet lists. I am able to iterate over and count all bullets in the document (see below), but I can't seem to find any way to determine what bullet style is being used for each bullet. All these bullets exist on the same level, so the list level doesn't help. I need to be able to determine "Is this bullet an Arrow icon or a Black dot icon?" However, since the styles are the defaults baked into Word I can see a way to SET the style for that list, but I can't find a way to GET a value of the current style.

Thanks in advance for your help!

Dim oPara As Word.Paragraph
Dim count As Integer


count = 0

'Select Entire document
Selection.WholeStory

With Selection
    For Each oPara In .Paragraphs
        If oPara.Range.ListFormat.ListType = WdListType.wdListBullet Then

                MsgBox "debug: " & oPara.Range.ListFormat.ListType & "//" & oPara.Range.Text

                count = count + 1


        End If
    Next
End With

'Gives the count of bullets in a document
MsgBox count
0

There are 0 answers