I'm using the code below to search for highlighted keywords and change their look...
Code:
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Shading.BackgroundPatternColor = RGB(235, 214, 214)
With .Replacement
.ClearFormatting
.Font.Bold = True
.Font.ColorIndex = wdWhite
End With
.Execute FindText:="", ReplaceWith:="", _
Format:=True, Replace:=wdReplaceAll
End With
Beside making them bold and changing their font color, I'd also like to change their background color. I tried all sorts of ways using the
two codes below, but nothing seemed to work...
Code:
.Font.Shading.BackgroundPatternColor = RGB(0, 0, 0)
.Font.HighlightColorIndex = wdBlack
So, in the end they should be bold, with a white font color and black background.
Changing them this way make them more easily noticeable when printing the document in black and white. That's what I'm using the code for.
Can anyone help me, please?
Thank you,
Alex