![]() |
|
#1
|
|||
|
|||
|
This code should remove text between [] inserted in bookmarks, the problem is that it's removing the 1st bookmark at the start of the document. Any ideas on how to adjust this? Thanks. Code:
Sub Test()
With ActiveDocument.Content.Find
.Text = "\[*\]"
.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 |
Word 2003 Brackets appear around copied text
|
barrage | Word | 1 | 12-16-2015 02:59 PM |
| Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
Form updating Bookmarks - writes to the bookmarks multiple times
|
PeterPlys | Word VBA | 13 | 01-14-2015 06:41 AM |