View Single Post
 
Old 07-21-2021, 05:08 PM
Peterson Peterson is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jan 2017
Posts: 143
Peterson is on a distinguished road
Default

It looks like every set of numbers in parentheses that you need to delete begins with ct., so you can delete those sets while leaving your totals with the following code:
Code:
Sub Test_Replace()
    With ActiveDocument.Content.Find
        .Text = "\(ct.*\)"
        .Replacement.Text = ""
        .ClearFormatting
        .Replacement.ClearFormatting
        .MatchWildcards = True
        .Execute Replace:=wdReplaceAll
    End With
End Sub
Reply With Quote