Hello,
I used the macro (http://pharma-sas.com/a-sas-macro-to-combine-portrait-and-landscape-rtf-files-into-one-single-file/) on one scenario and found the page number did not keep the original one. Instead pages is from 1 to N where N is the number of total pages of combined RTF file. The reason I suspect is that RTF code when opened in NotePad++ contains page information like this
\fldinst { PAGE }}}{ of }{\field{\*\fldinst { NUMPAGES }}} .
And this is probably due to fact that RTF code "^{pageof}" in used in proc report in SAS program to create the RTF file.
Can someone help?
So what is your question?
Are you asking if there is RTF syntax that allows numbering to restart from 1 when you start a new section of the file?
That is probably a question you should ask on an RTF or Microsoft forum.
Thanks for asking!
For example, I want to combine two rtf files, each has 1 page. Each page is "1 of 1" with page number . But the combined rtf file has "1 of 2" and "2 of 2". This is NOT what I wanted. What I wanted is the original page: "1 of 1" and "1 of 1".
To create two rtf files with SAS, I use "^{pageof}", where "^" is escape character. See code below to create two dummy rtf files: RTF1.rtf and RTF2.rtf.
And RTF1.rtf is like below:
The combined rtf file is like below for page 1. You can see page now is "1 of 2".
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.