Показывать номер страницы




Sub ShowViewPageNo()
ActiveDocument.Repaginate
varTotalPages = Selection.Information(wdNumberOfPagesInDocument)
varVertScrollPercent = ActiveDocument.ActiveWindow _
.VerticalPercentScrolled
varViewPage = Int((varVertScrollPercent / 100) * varTotalPages) + 1
varIPPage = Selection.Information(wdActiveEndPageNumber)
MsgBox "Your insertion point is on page [" & varIPPage & "]." + _
"You are looking at page [" & varViewPage & "].""
End Sub


Далее: Пример запуска макроса в MS Word »»