know how to obtain the number of lines written on a given page ?
Hello,
Does anyone know how to obtain the number of lines written on a given page (numPage)?
The following code only works if "numPage + 1" exists.
Set startPage = ActiveDocument.GoTo(What:=wdGoToPage, Count:=numPage)
Set endPage = ActiveDocument.GoTo(What:=wdGoToPage, Count:=numPage + 1)
endPage.Collapse Direction:=wdCollapseEnd
MsgBox ActiveDocument.Range(startPage.Start, endPage.Start).ComputeStatistics(wdStatisticLines)
Thank you very much for your feedback.
Yours sincerely
David
|