Word VBA, Get Current Page Number
Using the code below you can get the current page number the cursor is on:
Sub main()
Dim intCurrentLine As Integer
intCurrentLine = _
Selection.Range.Information(wdActiveEndPageNumber)
MsgBox (intCurrentLine)
End Sub
In the figure below the cursor is located at page 10:
Result after running the code:
See also:
If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website www.software-solutions-online.com