Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    I have set up a numbered list structure which indents each level by .75 cm. I did not use Outline Numbering to set up the levels.

    In most cases, a list follows one para after another until I need to insert a new list further down the document. How do I set the styles so that the numbering restarts each time I apply the style?

    In Level 1 of this numbered list structure, I get a tab 1/4" (0,63") to the right of the tab that I have already inserted every time I restart the numbering. How do I stop this?

    The problem does not appear to occur with Level 2 and subsequent levels of the numbered list structure or with bullet lists.

    It's driving me crazy. Can someone help?

    Cheers

    Geoff

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

    Re: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    Hi Geoff:
    The whole purpose of linking a numbered template to a style is to get a continuous list, unless you restart the numbering. You can either right click where you want to restart the numbering, choose Bullets & Numbering... &click on the restart button, or use this macro by Gary Frieder:

    <pre>Public Sub ListRestart()
    ' Resets numbering of current list to restart numbering
    ' by Gary Frieder
    Dim aList As Variant
    Set aList = Selection.Range.ListFormat
    aList.ApplyListTemplate ListTemplate:=aList.ListTemplate, _
    ContinuePreviousList:=False
    End Sub</pre>


    You can assign a shortcut key or put in on a toolbar for easy access.

    Hope this helps.

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

    Re: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    Geoff

    The tab that keeps coming back is known as the "Jason Tab" for that very reason. It has been discussed here many times before and I would suggest a search on that to have a look at earlier discussions.

    The easiest way to be rid of it is to indent the subsequent lines of that paragraph level. If the number hangs out to the left of the paragraph indent then the Jason Tab doesn't appear. You could also use styles instead to call up a numbered list. That would mean once you remove the extra tab from the style it won't reappear until you visit the Bullets and Numbering dialog again (You shouldn't need to if you use the macro that Phil posted).
    Andrew Lockton, Chrysalis Design, Melbourne Australia

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

    Re: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    Phil,

    Two picky points:

    Not sure the origin of that code with my name on it - I think I got that code from Andrew Lockton. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    A couple of little emendations should be made to that code:
    - Declare the variable as type ListFormat rather than Variant
    - Set aList = Nothing at the end

    <pre>Public Sub ListRestart()
    ' Resets numbering of current list to restart numbering
    Dim aList As ListFormat
    Set aList = Selection.Range.ListFormat
    aList.ApplyListTemplate ListTemplate:=aList.ListTemplate, _
    ContinuePreviousList:=False
    Set aList = Nothing
    End Sub
    </pre>

    Gary

  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: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    <P ID="edit" class=small>Edited by Phil Rabichow on 12-Jul-02 16:39.</P>Hi Gary:
    Thanks for the corrections. I'm not sure which post I got that from, but I know I ended up taking it from one of yours. Can you tell me the purpose of the changes, as I've been using the old one. In the same prior post, I think I also got this macro:<pre>Public Sub ListContinue()
    ' Continue numbering from previous list
    ' by Gary Frieder
    ' - does not reset any other direct paragraph formatting
    Dim aList As Variant
    Set aList = Selection.Range.ListFormat
    aList.ApplyListTemplate ListTemplate:=aList.ListTemplate, _
    ContinuePreviousList:=True
    End Sub</pre>

    Should this one be changed also?

    Whoops! You're so right, Gary. I apologize, Andrew, it came from <!post=this thread,140219>this thread<!/post>. I must have gotten them from <!post=this thread,123771>this thread<!/post>

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

    Re: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    Hi Phil,

    There's lots of cases where there are almost identical code solutions floating around; after a while you lose track of what came from where...

    Anyway, the two changes in my previous posts are just small improvements but yes they're worth making:

    Dim aList As ListFormat is just a little better than Dim aList as Variant - generally speaking 'Variant' should only be used when a corresponding type does not exist - in this case there is a ListFormat type so it should be used (I see Andrew had that right in his version all along.)

    The other little change is: whenever you use a 'Set' statement to assign an object to a variable, it's good programming practice to explicitly set that object variable = Nothing when you are done with it or at least before the end of the procedure.

    Gary

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

    Re: Tabs in numbered lists (Word 97 SR2b, Word 2000 SR 1a)

    Thanks for the info, Gary. Hmmm, since I don't program...but I have copied about 60 macros, I don't recall any of the variables being set back to nothing. Maybe I should go in & do that.

Posting Permissions

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