Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

Test whether a paragraph is bulleted

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raphael Goubet - 18 Mar 2005 15:55 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.