Usage Note 15727: Writing "PAGE X of Y" in ODS RTF does not work with the BODYTITLE option
Raw RTF code or the inline style function PAGEOF can be used in a TITLE or FOOTNOTE statement to write "PAGE X of Y" text in RTF output. However, if the BODYTITLE option is also used in the ODS RTF statement, the PAGEOF information is not written as expected.
This is the intended behavior. The PAGEOF information is designed to be written in the header or footer areas of a document. The BODYTITLE option removes the TITLE/FOOTNOTE from the header/footer section of an RTF file.
If the desired location of the page numbering is in the header or footer section of the RTF file, then the BODYTITLE option must be removed or Microsoft Word must be used to set the page numbering format.
An alternative is to use the TEMPLATE procedure to write "Page X of Y", which places the PAGEOF information in the upper right corner of each page. The code below applies to the default page number location only, and requires the NUMBER option to be in effect.