There is no simple function in Word to do this.
You could use a nested
IF Field. This field reports a page number as binary up to page 4 (100 binary):
{ If { page } = “1” “1” { If { page } = "2" "10" { If { page } = "3" "11" { If { page } = "4" "100" { page }}}}}
If the page number is greater than 4, it reports in decimal; that is the final page field. The field delimeters { } cannot simply be typed in. They are inserted in pairs using Ctrl+F9.
A document containing the field is attached. Note the field in the footer.
There is a limit to how deep IF fields can be nested. This one has four levels. If you are going to have more than eight, I would recommend having a separate nested field for each eight pages, without the final page field.
Here is the
syntax for the IF field.
Have fun. Something similar could be done with the NumPages field so you could have Page 1 of 100 for a four-page report. That is left as an exercise for the student.