• Continuing numbering in outline numbering styles

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Continuing numbering in outline numbering styles

    Author
    Topic
    #497589

    Hello!

    I have been tasked with rolling out a new numbering style within my organisation to simplify outline numbering within documents. I have hit upon two issues that I hope you may be able to help with:

    1) I want to be able to offer people the ability to have a level 1 style in Regular font or in bold. This will allow people to have level 1 as either a paragraph or as a heading and still allow the numbering to flow. Every time I add in a Level1 bold style it restarts the numbering. Please see below for an example of how I want the numbering to appear and if anyone can help me out…

    1. this is a Level 1 entry
    2. This is a Level 1 Bold Entry
    3. This is another Level 1

    But what is happening is:

    1. This is a Level 1 Entry
    1. This is a Level 1 Bold Entry
    2. This is a Level 2 Entry

    2) The outline numbering I have gone for gives me :
    1 – Level 1
    1.1 – Level 2
    1.1.1 – Level 3
    1.1.1.1 – Level 4
    (a) – Level 5
    (i) – Level 6

    The numbering works perfectly except when I put in a Level 4 after a Level 5 or 6. What I want to happen is this:

    1. Level 1 Entry
    (a) Level 5/6 Entry
    1.1.1.1 Level 4 Entry

    But what actually happens is:

    1. Level 1 Entry
    (a) Level 5/6 Entry
    1.1.1.2 Level 4 entry

    I can restart the numbering on the Level 4 and this gives me 1.1.1.1, however if there is a way to force this restart without any manual intervention I would love to hear it!

    Thanks

    Alba

    Viewing 1 reply thread
    Author
    Replies
    • #1479051

      The way you are numbering the document is problematic as you have discovered. The outline list levels dialog allows you to associate a level with only one style and trying to get the same level associated with a second paragraph style doesn’t happen in that dialog. However, it can be done and the basic process is as follows…
      1. Set up your heading numbering and associate each level to the relevant Heading style.
      2. Create a new style based on each Heading style and change the font and paragraph properties to suit the ‘non bold’ paragraphs you wanted. Don’t change the outline level parameters

      A macro which does the labour intensive step 2 looks like this. It assumes the ‘Normal Hx’ styles don’t already exist and that the heading numbering is already setup correctly. You wont be able revisit the outline levels for the headings after these children styles are created. Doing so will require the same process to be followed again.

      Code:
      Sub CreateNormNumStyles()
        Dim sBaseName As String, i As Integer, aStyNormal As Style, aLT As ListTemplate
        
        sBaseName = "Normal H"
        Set aStyNormal = ActiveDocument.Styles(wdStyleNormal)
        Set aLT = ActiveDocument.Styles(wdStyleHeading1).ListTemplate
        Debug.Print "Outline: " & aLT.OutlineNumbered
        
        'DeleteNormNumStyles
        
        For i = 1 To 9          '9 to 1 Step -1
          ActiveDocument.Styles.Add sBaseName & i, wdStyleTypeParagraph
          With ActiveDocument.Styles(sBaseName & i)
            .BaseStyle = "Heading " & i
            .ParagraphFormat = ActiveDocument.Styles("Heading " & i).ParagraphFormat
            .Font = aStyNormal.Font
            .ParagraphFormat.SpaceAfter = aStyNormal.ParagraphFormat.SpaceAfter
            .ParagraphFormat.SpaceBefore = aStyNormal.ParagraphFormat.SpaceBefore
            .ParagraphFormat.KeepWithNext = False
          End With
        Next i
      End Sub

      The second issue (where you go from level 1 to level 5 and then back to level 4) you described is a different case. This can be resolved with macros but I would recommend you actually have two different outline number streams – one for the ‘headings’ and one for the ‘numbered lists’. This will avoid other related issues such as having multiple separate lists under the one heading.

    • #1479071

      Thanks for the response Andrew,

      I take your point on my second issue and have now separated out the list elements from my styles – I completed more testing and noted that the numbering styles that have been in use for the past 10 years have the very same problem and no-one had mentioned it..I must test too well!! 😉

      For the first issue – providing a bold heading while retaining the same outline numbering – I have tried your coding, and while it certainly creates a set of numbering styles based upon those that already exist, all I changed was the format to be bold, yet when it is applied it is restarting the numbering and not continuing from the previous set.

      However, this has made me notice that within 3 of the inbuilt styles (see image) 38646-styles2 that when I highlight a line of text and then set it to bold, it also Bolds the number. This is all that I am looking for! I based my numbering on the set marked yellow in the attached image – Is there a reason that once I have renamed and reformatted the style that when I apply bold to a line of text that only the text is bold and not the number??

      • #1479167

        If you leave the number font formatting undefined (in the outline numbering dialog) then the numbers will appear with the same font formatting as the applied paragraph style. If you actually specify the number formatting then this same formatting will apply to both styles that use the same number outline level.

        Generally, you can format the number by selecting the paragraph mark at the end of the paragraph but I haven’t fiddled with this for a while and you may need to experiment to get that the way you want it since you are pushing the envelope with this particular feature.

    Viewing 1 reply thread
    Reply To: Continuing numbering in outline numbering styles

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: