View Single Post
 
Old 06-21-2023, 05:10 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

There is a special bookmark to work with a range (or select) for a full page
Code:
Sub GetLines()
  Dim rng As Range
  Set rng = ActiveDocument.GoTo(What:=wdGoToPage, Count:=3)
  Set rng = rng.GoTo(What:=wdGoToBookmark, Name:="\page")
  MsgBox rng.ComputeStatistics(wdStatisticLines)
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote