BookmarkSubscribeRSS Feed
SuzanneDorinski
Lapis Lazuli | Level 10
The instructions given on sas.com aren't enough detail. Please help!

I'm creating an RTF document and using the page number in a footnote. Suppose the RTF output I'm creating is Appendix A, and the footnote statement is

footnote "^S={just=c font_weight=medium font_face=arial font_size=8.5pt}Appendix A Page ^{thispage}";

where I've already specified ^ as the ODS escape character.

The RTF output file will eventually be included in another Word document, where the user has already written a report, which is the main part of the document. The RTF that I'm creating will be inserted into Word by the user, who will insert a section break after the end of their report and then insert the RTF file. The user wants the footnote in Appendix A to show Appendix A Page 1 on the first page, Appendix A Page 2 on the second page, and so on.
3 REPLIES 3
deleted_user
Not applicable
{Page} {\field{\*\fldinst{ PAGE }}}\~{of}\~{\field{\*\fldinst { SECTIONPAGES }}}
SuzanneDorinski
Lapis Lazuli | Level 10
Actually, no, that suggestion does not work.

The only thing that seems to work is to tell the user to insert the RTF in Word after the descriptive text, then have the user view the footer and choose the option to start page numbers from 1 in this section, instead of numbering continuously from the previous section.

I was hoping there was something I could specify in SAS to automate this.
deleted_user
Not applicable
Well, maybe.

The RTF created by SAS can honor the SAS Option
options pageno=50 ;
This will start the page numbering at 50. You cna also reset it. It does this by using the RTF specs
\pgnrestart\pgnstarts50 in the section data. The 50 comes from the SAS option.

You want to do the page numbering on the footnote, so you are probably cutting them off in the header body. Using option nonumber;
won't prevent the reset.

There is an undocumented and lightly tested (non production) feature in 9.1 that allows section data to be appended at new section breaks, for instance,

ODS RTF sectiondata="\sbknone" ;

It is not parsed so any use of it is not formally supported.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2567 views
  • 0 likes
  • 2 in conversation