![]() |
|
#4
|
||||
|
||||
|
Your code fails because it lacks the \ before the { and }. Without that, those characters act as wildcard escape characters ebut what you have between them then doesn't conform to what a wildcard search requires to be between them.
Try: Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "\{[MTWFS][onuedhuriat]{2} Workshop\}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
If .Information(wdWithInTable) = True Then
.Rows(1).Shading.BackgroundPatternColorIndex = wdYellow
'.Delete
End If
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Inserting a Merged Row after a certain text is found in a table
|
Snaybot | Word VBA | 13 | 09-30-2015 03:12 PM |
Table, font color based on what word is in cell
|
donaldadams1951 | Word Tables | 1 | 04-15-2015 08:37 PM |
| Color-fill a range of cells, based on text in a different sheet. Possible? | unittwentyfive | Excel | 2 | 06-01-2014 06:48 AM |
Word VBA Macro to Find and Replace based on the Alt Text of an Image
|
bennymc | Word VBA | 1 | 01-27-2014 04:23 PM |
Word 2003 - Macro to color a row in table?
|
cyberpaper | Word | 2 | 01-03-2013 02:07 PM |