|
- Sub test()
- Selection.HomeKey Unit:=wdStory
- Selection.Find.ClearFormatting
- Do
- Selection.Find.Execute findtext:="增加=", Forward:=True
- If Selection.Find.Found = True Then
- Do
- Selection.MoveEnd Unit:=wdCharacter, Count:=1
- Loop Until Selection.Characters.Last Like "[0-9.]"
- Selection.Characters.Last.Select
- Do
- Selection.MoveEnd Unit:=wdCharacter, Count:=1
- Loop Until Selection.Characters.Last Like "[!0-9.]"
- Selection.MoveEnd Unit:=wdCharacter, Count:=-1
- Selection = Selection * 2
- Selection.Font.Color = wdColorRed '红色
- Selection.MoveRight Unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- End Sub
复制代码 |
|