|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub test名师押题()
- '预处理
- With ActiveDocument.Content.Find
- .Execute "^13", , , 0, , , , , , "^p", 2
- .Execute "^11", , , 0, , , , , , "^p", 2
- .Parent.ListFormat.ConvertNumbersToText
- End With
- '
- Dim r As Range
- With Selection
- .HomeKey unit:=wdStory
- With .Find
- .ClearFormatting
- Do While .Execute("名师押题", , , 0, , , 1)
- With .Parent
- With .Font
- .Name = "黑体"
- .Bold = True '加粗
- .Color = wdColorRed '红色
- End With
- Do
- .Move 4, 1
- .Expand 4
- Set r = .Range
- With r
- If .End = ActiveDocument.Content.End Then Exit Do
- If r Like "[一二三四五六七八九十百零千]*、*" Or r Like "[((][一二三四五六七八九十百零千]*" Then Exit Do
- With .Font
- .NameFarEast = "楷体_GB2312" '楷体(如果是WIN7系统,请删除"_GB2312"只留“楷体”)
- .NameAscii = "Times New Roman"
- .Size = 9 '小五
- .Bold = True '加粗
- .Color = wdColorPink '粉红
- End With
- End With
- Loop
- .EndKey 5
- End With
- Loop
- End With
- .HomeKey unit:=wdStory
- End With
- End Sub
复制代码 |
|