Results 1 to 15 of 15
  1. #1
    writer
    Guest

    List numbering follies

    In a document I created using Word's Manual template, I changed the font of the number in the List Number style. Now, when I apply that style to lists, the font of the number changes (good), but the lists no longer restart at 1 (bad). Why does this happen, and how does that default automatic restarting at 1 (that is part of the template) work?

    (I also note that there is no Restart Numbering option in the Numbering gallery when creating or modifying a style.)

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: List numbering follies

    Yep, its a problem due to the fact that lists require a LOCAL formatting change to restart the list. I use macros to handle restarting or continuing lists as posted below.

    <font class="smaller"><pre>Sub ListContinue()
    ' Resets paragraph formatting on the current selection
    ' Is used in a List to continue numbering from previous list
    Selection.ParagraphFormat.Reset
    End Sub

    Sub ListRestart()
    ' Macro created by Rob Phillips
    ' Resets numbering of current list to restart numbering
    Dim MyList As ListFormat
    Set MyList = Selection.Range.ListFormat
    MyList.ApplyListTemplate ListTemplate:=MyList.ListTemplate, ContinuePreviousList:=False
    End Sub
    </pre>

    </font size=small>
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    writer
    Guest

    Re: List numbering follies

    Thanks Andrew,

    I recorded my own macro (and cut out the unnecesary parts) to do renumbering:

    Sub restartListNumberingAt1()

    With ListGalleries(wdNumberGallery).ListTemplates(4).Li stLevels(1)
    .StartAt = 1
    End With
    ListGalleries(wdNumberGallery).ListTemplates(4).Na me = ""
    Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries( _
    wdNumberGallery).ListTemplates(4), ContinuePreviousList:=False, ApplyTo:= _
    wdListApplyToWholeList, DefaultListBehavior:=wdWord9ListBehavior
    End Sub

    I still don't know how the default style in that template does it automatically when I applied it to sevearl consecutive paragraphs of plain text.

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: List numbering follies

    Can't let the return of Andrew Lockton go without notice:

    <font color=blue><font face="Comic Sans MS"><font class="bigger">WELCOME BACK ANDREW!!</font color=blue></font face=comic></font size=big>[img]/w3timages/icons/king.gif[/img]

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List numbering follies

    [redHERE!</font color=red><font color=red>HERE!</font color=red> I've seen only 2 posts & already I have two new macros. Thank you, Andrew.

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: List numbering follies

    Hi Gary and Phil - and happy new year

    I had low expectations of continuing to hang out here after the first return of the Lounge but this one is a huge step up from the mid-life crisis of Ikonboard.

    Andrew [img]/w3timages/icons/woof.gif[/img]
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    writer
    Guest

    Re: List numbering follies

    The code for the ListRestart procedure generates a "Run-tome error 'S' Invalid procedure or argument" error in the line

    MyList.ApplyListTemplate ListTemplate:=MyList.ListTemplate, ContinuePreviousList:=False

    Any idea why?

  8. #8
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    It won't work if...

    The macro won't work if your cursor is not in a list already. Make sure the selection is in an automatic list before running the macro to avoid that error.

    Maybe I need an error catcher in there but I have never tried to restart a list where one wasn't already applied.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  9. #9
    writer
    Guest

    Re: It won't work if...

    I think I may have cought what might be the issue. At least, if what you mean by "automatic list" is a numbered list that you create by clicking the Numbered List button when Body Text (or Normal text) is selected.

    But I am not doing that. Instead, I am creating lists the "proper" way: by using styles, and the styles that are part of the Manual template in W2K.

    In the default style, when the style is applied to one or more selected paragraphs, the foramtting and numbering is applied, and the numbering for the selected paragrpahs starts at 1. But when I modified the style (paragraph spacing and number font), applying that style no longer restarts numbering at 1 for the selected paragraphs.

    When I run the macro you offered on the paragraphs that have been givin formatting and numbering in this way, the error appears.

  10. #10
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Hmm...

    writer

    If the number is applied by using a style then it must be automatic ie. you can't select the number no matter how hard you try.

    The actual smarts which restart the number is a local formatting change which must be applied to the first element of the list. Just applying a numbered style with no local formatting will make the list continue from the last occurence of that list item (Word 8). However in the code you posted I noticed that there is another option on the ApplyList line which allows <pre>DefaultListBehavior:=wdWord9ListBehavior</pre>

    I have not seen this in Word 8 and rarely use Word 9. That option indicates that maybe Microsoft smartened up the lists because of this problem in Word 8 and maybe there is an option somewhere that makes a list restart if it's pattern is broken like it used to in versions before Word 8.

    Perhaps there is a syntax issue with Word 2000 that I am not aware of. In any case, use whatever works. If your code does the trick then go ahead and use that. It may be worth examining the other options for DefaultListBehavior as that will most likely do something along these lines.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  11. #11
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: List numbering follies

    Charles Kyle Kenyon
    Madison, Wisconsin

  12. #12
    Rose
    Guest

    Re: List numbering follies

    I see I'm not the only one who can't figure out how the list number style in the manual template restarts automatically at one!! Is it possible that there is a macro controlling the behavior of this style? I'd love to be able to reproduce the behavior, so if anybody has any idea how to do so I'd be very interested.
    Thanks!
    Rose

  13. #13
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: List numbering follies

    Have you tried

    Dim MyList As Variant
    Set MyList = Selection.Range.ListFormat
    MyList.ApplyListTemplate ListTemplate:=MyList.ListTemplate, _
    ContinuePreviousList:=False
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  14. #14
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: List numbering follies

    Rose,

    Save yourself a lot of headaches and time by downloading the Word version of:

    http://www.mvps.org/word/FAQs/Customizatio...mplatePart2.htm
    It includes a very good and very well-documented manual template with close-to bullet-proof numbering styles.

    Word's Manual template just isn't very good.

    For more on numbering:

    Word's Numbering Explained
    http://www.mvps.org/word/FAQs/Numbering/Wo...ngExplained.htm

    How to Create a Template, 2
    http://www.mvps.org/word/FAQs/Customizatio...mplatePart2.htm

    Legal Numbering
    http://www.addbalance.com/usersguide/numbering.htm

    Seven Laws of Outline Numbering (several of which are broken by the Microsoft Manual template)
    http://www.microsystems.com/fra_sevenlawso...nenumbering.htm

    Hope this is of help.
    Charles Kyle Kenyon
    Madison, Wisconsin

  15. #15
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, BC
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: List numbering follies

    I just used the ListRestart macro. I haven't read any of the other posts - just found that, used it and it worked. Thanks, Andrew.

Posting Permissions

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