View Single Post
 
Old 03-04-2021, 05:03 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It will show page 2 - the clue is in the information sought by the function.
If you want the page number it starts on then collapse the range to its start before asking the question e.g.
Code:
Dim iStart As Integer, iEnd As Integer
    With Selection.Paragraphs(1).Range
        iEnd = .Information(wdActiveEndPageNumber)
        .Collapse 1
        iStart = .Information(wdActiveEndPageNumber)
        MsgBox "Starts on page " & iStart & vbCr & "Ends on page " & iEnd
    End With
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote