|
- Sub test非红色字符转黑色()
- With ActiveDocument
- '红色字符加下划线
- With .Content.Find
- .ClearFormatting
- .Font.Color = wdColorRed
- With .Replacement
- .ClearFormatting
- .Font.Underline = wdUnderlineSingle
- End With
- .Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
- End With
- '全文设为黑色
- .Content.Font.Color = wdColorBlack
- '查找下划线字符设为红色,并取消下划线
- With .Content.Find
- .ClearFormatting
- .Font.Underline = wdUnderlineSingle
- With .Replacement
- .ClearFormatting
- With .Font
- .Color = wdColorRed
- .Underline = wdUnderlineNone
- End With
- End With
- .Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
- End With
- End With
- End Sub
复制代码 |
|