![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]()
Try:
Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "%" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute End With Do While .Find.Found If .Information(wdWithInTable) = True Then If .Cells(1).Shading.BackgroundPatternColorIndex = wdGray50 Then .Text = "CB1" End If If .End = ActiveDocument.Range.End Then Exit Sub .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting a particular table cell background color when an option button is selected in Word 2007 | a888 | Word VBA | 11 | 03-25-2015 05:33 AM |
![]() |
rohanrohith | Word VBA | 3 | 11-27-2014 01:08 PM |
![]() |
pintree3 | Word | 5 | 10-27-2014 10:23 AM |
Word VBA Find Table Text Shading Colour and replace with another | QA_Compliance_Advisor | Word VBA | 10 | 09-19-2014 08:36 AM |
how to search and replace BOLD text >> font color change? | dylansmith | Word | 4 | 03-12-2013 09:51 PM |