The function of the following code is to select the current page of the Word document, and note that it is the current page, the page where the insertion bar is located, not the full text.
Dim Currentpagestart as Long, currentpageend as Long, myRange as Range
Dim currentpage As Integer, Pages as Integer
On Error Resume Next
CurrentPage = Selection.Information (wdActiveEndPageNumber)
Pages = Selection.Information (wdnumberofpagesindocument)
Currentpagestart = Selection.goto (What:=wdgotopage, Which:=wdgotonext, Name:=currentpage). Start
If currentpage = Pages Then
Currentpageend = ActiveDocument.Content.End
Else
Currentpageend = Selection.goto (What:=wdgotopage, Which:=wdgotonext, Name:=currentpage + 1). Start
End If
Set MyRange = ActiveDocument.Range (Currentpagestart, Currentpageend)
Myrange.select
Note that the above code is used in a VBA environment.