View Single Post
 
Old 09-25-2024, 06:13 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]{1,})\)"
     'make sure lists with unopened brackets a) get opening bracket and insert tab
     .Replacement.text = "^p(\1)"
     .Execute Replace:=wdReplaceAll
     'make sure lists with period a. get brackets and insert tab
     .text = "^13([a-z0-9]{1,})."
     .Execute Replace:=wdReplaceAll
  End With
  End With
  End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote