| |
今更ですが。これも自分の勉強として書いてみました。
Sub test()
Dim cnt As Long
Dim myRng As Range
ActiveDocument.Range(0, 0).Select
Set myRng = Selection.Range
Do
cnt = cnt + 1
Selection.TypeText Text:="save" & cnt & "|save"
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey
myRng.SetRange Selection.Start, Selection.End
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey
Loop While ActiveDocument.Range.End - 1 <> myRng.End
End Sub
|
|