Page Numbers


Return the Page Number at the current cursor position

Selection.Information(wdActiveEndPageNumber) 
ActiveDocument.Content.Information(wdInformation.wdActiveEndPageNumber)

Return the number of pages in the active document

Selection.Information(wdInformation.wdNumberOfPagesInDocument) 

ActiveDocument.BuiltInDocumentProperties("Number of Pages") 

The last method is the most reliable, but also the slowest

ActiveDocument.Content.ComputeStatistics(wdStatistic.wdStatisticsPages) 


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext