Results 1 to 4 of 4
  • Thread Tools
  1. 2 Star Lounger
    Join Date
    May 2002
    Location
    Atlanta, Georgia, USA
    Posts
    122
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Differentiate between list types (Word 2003)

    I'm trying to reformat a document that includes pasted HTML. Everything comes in with the Normal (Web) style, though bulleted lists and numbered lists have the correct formatting. I want to identify the lists in the text and apply bullet or numbered styles as appropriate.

    I can iterate through the ActiveDocument.Lists object and select each list, but I can't find a way to determine the type of list for each paragraph. If I use Selection.Range.ListFormat.ListType, everything comes back as wdListOutlineNumbering. I am using outline numbering for headings in the template, but I'm surprised that bullets don't come over as wdListBullet.

    Is there some other way to test for whether a paragraph or a list has a generated bullet? Both types of lists have the same paragraph format settings, so I can't test for different indents or tabs.

    Thanks!
    Bob
    Writing Consultant / Word Template Designer
    Words Connect

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Differentiate between list types (Word 2003)

    Can you post a sample to play with? Perhaps there are some other properties of this "outline list" that give away the fact that it's a bulleted list.

  4. 2 Star Lounger
    Join Date
    May 2002
    Location
    Atlanta, Georgia, USA
    Posts
    122
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Differentiate between list types (Word 2003)

    As I was doctoring up a sample to post, I tried Reveal Formatting (Shift+F1) to compare the list items.

    (BTW, I like having that information in a pane in Word 2003, instead of having it pop up in a "bubble". I don't care for using panes to display Styles and Formatting, but this one worked for me. It allowed me to easily move the cursor between list items to compare the underlying format.)

    From there, I could see that in this pasted HTML, bullets and numbers both use Outline Numbering, and both are List Level 1. The difference between the list items is the Numbering Style property of the List.

    With that, I was able to look in my Object Browser to find out where that info was specified. NumberingStyle is a property of the ListLevel object. This line of code test true for the bullet items:

    Selection.Range.ListFormat.ListTemplate.ListLevels (1).NumberStyle = wdListNumberStyleBullet

    It is bizarre to me that my bulleted items have outline numbering format. I've never understood the List, ListTemplate, and ListFormat thing. I read the descriptions of those objects in the help, and they just don't make any sense to me. I've tried to research them, but I've never fully comprehended the ins and outs of how those objects work. Looking at that line of code, I couldn't give you a coherent layman's description of what it does or why it works if my life depended on it.

    Bob
    Writing Consultant / Word Template Designer
    Words Connect

  5. 5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Differentiate between list types (Word 2003)

    There are times when it makes sense to use bullets as part of a multi-level outline, so I assume that's why bullets are available in "outline numbered" schemes (although the "numbered" in the title is certainly confusing). So if you've got a single-level bulleted list, you can either set it up with a List Bullet scheme or with an Outline Numbered scheme where you only use Level 1.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •