https://stackoverflow.com/a/11624006/1553562
如何将搜索范围限制为从用户输入的有限范围的文档???
答案 0 :(得分:3)
这将允许您指定从第3页到第20页的范围
Sub Sample()
Dim rng As Range
Dim StartPage As Long, EndPage As Long
StartPage = 3: EndPage = 20
Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=StartPage
Set rng = Selection.Range
Selection.GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=EndPage
rng.End = Selection.Bookmarks("\Page").Range.End
'~~> Now you have got your range. Do the necessary action here
With rng
End With
End Sub