如何为word文档中的所有数字着色?

时间:2014-12-06 15:29:35

标签: ms-word

我正在尝试使文本更容易学习,因此我希望着色特定信息,而无需查找每个信息并将其格式化。有可能吗?

1 个答案:

答案 0 :(得分:1)

这可能会有所帮助:

Sub Changenumbercolour()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
    .Text = "([0-9])"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub