本示例显示当前页码和活动文档的总页数。

MsgBox "The selection is on page " & _
    Selection.Information(wpsActiveEndPageNumber) & " of page " _
        & Selection.Information(wpsNumberOfPagesInDocument)