Results 1 to 2 of 2
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Restart at 1 (for any sort of numbered list)

    Here's the other 3% that Andrew Cronnolly was worried about <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=21730>http://www.wopr.com/cgi-bin/w3t/showflat.p...rd&Number=21730</A>


    I am essaying with a macro to reset numbering. I'd really like a toolbar button that says "Restart at 1" for any sort of numbered list i hav.

    The code below does the trick. The function takes a "restart" value as parameter. My little user macro cmd_RestartNumbering is temporarily set to force renumbering at "6" so it's easy to spot when it works.

    I don't understand this business of List Galleries and the like.

    My macro works no matter whether I am using ListNumber2 or ListNumber5. That ListTemplates(3) seems like a Red Herring.

    The formatting (paragraph indentation) gets screwed up. I've not got as far as worrying about that.

    The really sad news is my finding out that I'm not quite as brilliant as I'd have you all believe, and that I still need help!


    Nor have I started worrying about what happens when I restart numbering at "6" on a bulleted list.


    <pre>Function RestartNumbering(intStart As Integer)
    With ListGalleries(wdNumberGallery).ListTemplates(3).Li stLevels(1)
    .StartAt = intStart
    End With
    Selection.Range.ListFormat.ApplyListTemplate _
    ListTemplate:=ListGalleries(wdNumberGallery).ListT emplates(3), _
    ContinuePreviousList:=False
    End Function

    Sub cmd_RestartNumbering()
    Call RestartNumbering(6)
    End Sub
    </pre>


  2. #2
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Restart at 1 (for any sort of numbered list)

    [img]/S/bow.gif[/img][img]/S/clever.gif[/img][img]/S/thumbup.gif[/img]

    I don't know how many times I've had to beat Word into submission wrestling with this.

    Thanks!

    Mike "Having way too much fun with those smilies."

Posting Permissions

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