|
|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub 字体颜色设置_中文英文数字()
- With ActiveDocument.Content
- .Font.Color = wdColorBlue '蓝色
- With .Find
- '查找英文
- .ClearFormatting
- With .Replacement
- .ClearFormatting
- .Font.Color = wdColorPink '粉红
- End With
- .Execute findText:="[^1-^127]{1,}", MatchWildcards:=True, Replace:=wdReplaceAll
- '查找数字
- .ClearFormatting
- With .Replacement
- .ClearFormatting
- .Font.Color = wdColorRed '红色
- End With
- .Execute findText:="[0-9]{1,}", MatchWildcards:=True, Replace:=wdReplaceAll
- End With
- End With
- End Sub
复制代码 |
|