none
Numbering is wrong when paragraph is added RRS feed

  • Question

  • In certain cases, text has to be added to the document.

    It are full paragraphs with a title, the problem is that I can't get the numbers right.

    When I add the paragraph, to count goes like 1.9, 1.10, 1.10, 1.11

    I added the first 1.10 so the rest should change.$

    I used this as code in the macro.

     Selection.TypeText Text:="1.10 Aanwezigheidsregistratie"
        With ListGalleries(wdOutlineNumberGallery).ListTemplates(7).ListLevels(2)
            .NumberFormat = "%1.%2"
            .TrailingCharacter = wdTrailingTab
            .NumberStyle = wdListNumberStyleArabic
            .NumberPosition = CentimetersToPoints(0)
            .Alignment = wdListLevelAlignLeft
            .TextPosition = CentimetersToPoints(1.27)
            .TabPosition = CentimetersToPoints(1.27)
            .ResetOnHigher = 1
            .StartAt = 1
            With .Font
                .Bold = True
                .Italic = wdUndefined
                .StrikeThrough = wdUndefined
                .Subscript = wdUndefined
                .Superscript = wdUndefined
                .Shadow = wdUndefined
                .Outline = wdUndefined
                .Emboss = wdUndefined
                .Engrave = wdUndefined
                .AllCaps = wdUndefined
                .Hidden = wdUndefined
                .Underline = wdUndefined
                .Color = wdUndefined
                .Size = 8
                .Animation = wdUndefined
                .DoubleStrikeThrough = wdUndefined
                .Name = ""
            End With
            .LinkedStyle = ""
        End With
        ListGalleries(wdOutlineNumberGallery).ListTemplates(7).Name = ""
        Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
            ListGalleries(wdOutlineNumberGallery).ListTemplates(7), _
            ContinuePreviousList:=True, ApplyTo:=wdListApplyToWholeList, _
            DefaultListBehavior:=wdWord10ListBehavior
        Selection.TypeParagraph

        ...

    Tuesday, August 26, 2014 6:17 AM