I have a little macro that adds an opening bracket to sub level numbering e.g a) becomes (a) or b. becomes (b) etc., but the issue I'm having is that it does not add an opening bracket for roman numerals ii, iii or iv but does add an opening bracket for i or v - what line of code can I add to include ii, iii, iv?
Add brackets to sub level definitions.docx
Code:
Sub DPU_TestDefinitions()
Dim oRng As Range, Para As Paragraph
With ActiveDocument
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchWildcards = True
.text = "^13([A-Za-z0-9])\)"
'make sure lists with unopened brackets a) get opening bracket and insert tab
.Replacement.text = "^p(\1)"
.Execute Replace:=wdReplaceAll
.text = "^13([a-za-z0-9])\."
'make sure lists with period a. get brackets and insert tab
.Replacement.text = "^p(\1)"
.Execute Replace:=wdReplaceAll
End With
End With
End Sub