![]() |
|
#2
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Formatting text within brackets
|
jimmi6jjr | Word | 4 | 10-04-2022 09:33 PM |
find and delet all text within brackets and the brackets themselves
|
wrdy | Word | 2 | 08-03-2017 06:55 PM |
Find and Replace - How to insert brackets around all numbers in a doc
|
Natedogg | Word | 2 | 05-21-2015 07:16 AM |
| Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
Find/Replace Brackets Problem
|
fatso | Word | 2 | 08-04-2011 11:34 AM |