本文共 798 字,大约阅读时间需要 2 分钟。
- Sub EditFindLoopExample()
- With ActiveDocument.Content.Find
- .ClearFormatting
- .Style = wdStyleHeading3
-
-
- Do While .Execute(Forward:=True, Format:=True) = True
- With .Parent
-
-
- If .End = ActiveDocument.Content.End Then
- .StartOf Unit:=wdParagraph, Extend:=wdMove
- .InsertAfter "Tip: "
- Exit Do
-
-
- Else
- .StartOf Unit:=wdParagraph, Extend:=wdMove
- .InsertAfter "Tip: "
- .Move Unit:=wdParagraph, Count:=1
- End If
- End With
-
- Loop
- End With
- End Sub
转载地址:http://kwipi.baihongyu.com/