Hi,
I'm wondering what's the best way to test whether a paragraph is
bulleted or not, independently of its style.
Could someone help me out?
Thanks in advance.
Raphael
Klaus Linke - 18 Mar 2005 16:39 GMT
Hi Raphael,
For (outline) numbered lists and ListNum fields, myParagraph.Range.ListFormat.ListString should give you the bullet character if there is one.
It may be a bit difficult to differentiate between numbering and bullets (especially with non-arabic numbers).
You can use .Range.ListFormat.ListType to help you with that.
Regards,
Klaus
> Hi,
>
[quoted text clipped - 6 lines]
>
> Raphael
Stefan Blom - 29 Mar 2005 11:06 GMT
You have to find out whether the List property has a valid object
reference, and -- if it does -- find out what type of list it is.
Something like this should work:
If Selection.Paragraphs(1).Range.ListFormat.List Is Nothing Then
Debug.Print "No list at the first para of selection!"
Else
Debug.Print "There is a list of type " & _
Selection.Paragraphs(1).Range.ListFormat.ListType & _
" at the first para."
End If
Note that Debug.Print prints information to the Immediate Window of
the Visual Basic Editor. Use the Object browser to figure out the
values of the legal values for ListType.

Signature
Stefan Blom
> Hi,
>
[quoted text clipped - 6 lines]
>
> Raphael