|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub aaaaFillAnswer()
- Dim s$
- With Selection
- .EndKey 6
- .TypeParagraph
- .TypeParagraph
- .TypeParagraph
- .HomeKey 6
- With .Find
- .ClearFormatting
- .Text = "[0-90-9]@[、..]*( )*^13"
- .Forward = True
- .MatchWildcards = True
- Do While .Execute
- With .Parent
- .Font.ColorIndex = wdPink
- If .Next(4, 1).Characters(1).Font.ColorIndex = wdRed Then
- s = "A"
- ElseIf .Next(4, 1).Next(4, 1).Characters(1).Font.ColorIndex = wdRed Then
- s = "B"
- ElseIf .Next(4, 1).Next(4, 1).Next(4, 1).Characters(1).Font.ColorIndex = wdRed Then
- s = "C"
- ElseIf .Next(4, 1).Next(4, 1).Next(4, 1).Next(4, 1).Characters(1).Font.ColorIndex = wdRed Then
- s = "D"
- End If
- .Range.Find.Execute "( )", , , 0, , , , , , "( " & s & " )", 1
- .Start = .End
- End With
- Loop
- End With
- .HomeKey 6
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|