Hi,
You can't work with pages, you have to work with paragraphs.
You need to loop paragraphs and return the page number -
https://www.msofficeforums.com/word-...ph-number.html
Paragraphs overlapping over two pages will be problematic so ensure that all paragraphs are set to "Keep lines together".
To get last paragraph, just check when page number changes then add full stop at previous paragraph.