Reputation: 4190
How to write a macro, which finds all blocks of text with Font.ColorIndex = wdColorAutomatic
and changes it to wdColorWhite?
I need it to paste rich text to a panel with black background in Confluence wiki. Default colour for this background is grey.
Upvotes: 0
Views: 122
Reputation: 2176
try this:
Sub Test()
With ActiveDocument.Range.Find
.Text = "wdColorAutomatic"
.Replacement.Text = "wdColorWhite"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub
Upvotes: 1