如何编写一个宏,找到Font.ColorIndex = wdColorAutomatic
的所有文本块并将其更改为wdColorWhite?
我需要它将富文本粘贴到Confluence wiki中带有黑色背景的面板。此背景的默认颜色为灰色。
答案 0 :(得分:1)
试试这个:
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