![]() |
|
#2
|
||||
|
||||
|
There is no such property as:
.Font.HighlightColorIndex = wdBlack Moreover, you can't set the HighlightColorIndex that way via Find/Replace. You need to use something like: Code:
Options.DefaultHighlightColorIndex = wdBlack
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Shading.BackgroundPatternColor = RGB(235, 214, 214)
With .Replacement
.ClearFormatting
.Font.Bold = True
.Font.ColorIndex = wdWhite
.Font.Shading.BackgroundPatternColor = RGB(0, 0, 0)
.Highlight = True
End With
.Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Background color change with drop down list | Wolfin2010 | Excel | 1 | 02-02-2020 11:59 AM |
| how to change the selected area background color | wordyg | Word | 0 | 01-28-2019 09:10 PM |
VBA change font color to background color
|
donaldadams1951 | Word VBA | 6 | 05-31-2018 04:36 PM |
| Change excel background color, strange... | sojiro | Excel | 7 | 04-18-2018 10:07 AM |
| Can't change table background color in the header in Microsoft Word 2011 | simeon1 | Word | 0 | 10-13-2014 11:07 AM |