Legal numbering is a deprecated feature in Word that causes many many problems. For instance, here's an example where it breaks down:
1 Heading 1
1.1 This is some general blurb about this section
1.2 Sub heading <-- AND LOOK AT THAT, the legal numbering system is broken straight away.
There are workarounds like starting the paragraph numbering at level 3:
1 Heading 1
1.1.1 This is some general blurb
1.2 Sub heading
Or adding extra "General" sections
1 Heading 1
1.1 General
1.1.1 This is some general blurb
1.2 Sub heading
But lets face it, it's a dumb idea. Instead, the accepted method (such as used in Government documents) is to do the following which doesn't have the same issue but allows paragraphs to still be individually referenced easily:
1 Heading 1
1 This is some general blurb about this section.
1.1 Sub heading
2 Some more blurb.
3 Look another paragraph.
1.2 Sub heading
4 Just continue the numbering.
That being said, if you are forced to to the hacky Word legal numbering, the following macros will save your bacon. It'll allow you to convert between legal numbering and non-numbered. Just select the text you want to change, and it'll convert all Para 1, Para 2, Para etc... to Body Text.
If you want the legal numbering back, there's also a macro for that (naturally). This macro is a little bit trickier because it's got to work out the para level number so it takes a little longer to run.
' (c) Edward Chan 2025
Sub ChangeStylesToLegal()
' Replaces Body Text with Para 2, Para 3, etc depending on the heading above.
' Select some text f
Dim para As Paragraph
Dim sel As Selection
Dim headingLevel As Integer
Dim styleName As String
Dim x As Long ' use this to update the screen
x = 0
Application.ScreenUpdating = False
Set sel = Selection
For Each para In sel.Paragraphs
x = x + 1
' Check if the paragraph is "Body Text" style and not in a table or frame
If para.style = "Body Text" And Not para.Range.Information(wdWithInTable) And Not para.Range.Frames.Count > 0 Then
' Find the heading level directly above the paragraph
headingLevel = GetHeadingLevelAbove(para)
If headingLevel > 0 Then
' Change the style to "Para X" where X is heading level + 1
styleName = "Para " & (headingLevel + 1)
para.style = styleName
End If
End If
If x Mod 50 = 0 Then
Application.ScreenRefresh
End If
Next para
Application.ScreenUpdating = True
End Sub
Function GetHeadingLevelAbove(para As Paragraph) As Integer
Dim prevPara As Paragraph
Dim level As Integer
level = 0
Set prevPara = para.Previous
Do While Not prevPara Is Nothing
If InStr(1, prevPara.style, "Heading") > 0 Then
level = Val(Mid(prevPara.style, 8))
Exit Do
End If
Set prevPara = prevPara.Previous
Loop
GetHeadingLevelAbove = level
End Function
Sub RemoveLegalParas()
' Replace Para 2, 3, 4, 5, 6, 7, 8, 9 with "Body Text"
' Select the text first.
Dim stylesToChange As Variant
Dim targetStyle As String
Dim i As Integer
Dim styleTochange As String
Dim sel As Selection
' Define the styles to change
stylesToChange = Array("Para 2", "Para 3", "Para 4", "Para 5", "Para 6", "Para 7", "Para 8", "Para 9")
targetStyle = "Body Text"
Set sel = Selection
' Loop through each style in the stylesToChange array
For i = LBound(stylesToChange) To UBound(stylesToChange)
' Check if the style exists in the document
styleTochange = stylesToChange(i)
If StyleExists(styleTochange) Then
' Use Find and Replace to change the paragraph style
With sel.Range.Find
.ClearFormatting
.style = ActiveDocument.Styles(stylesToChange(i))
.Replacement.ClearFormatting
.Replacement.style = ActiveDocument.Styles(targetStyle)
.Execute Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindStop
End With
Debug.Print "Replace " & styleTochange & " with " & targetStyle
End If
Next i
End Sub
Function StyleExists(styleName As String) As Boolean
On Error Resume Next
StyleExists = Not ActiveDocument.Styles(styleName) Is Nothing
On Error GoTo 0
End Function