BookmarkSubscribeRSS Feed
Rose_G
Calcite | Level 5
If I want to insert RTF code that will impact the whole document (in this case, I want to change the page number formatting to roman numerals) where would I put that in my code? I've tried adding to the first title in the header and to the page number code and neither has any impact.

Thanks

Rose
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Rose:
This is a question best answered by Tech Support. I do not know the RTF control string for changing the page number to Roman numerals. I do know that in SAS 8 (before 'Escapechar + {Pageof}' was available), I could do this to get the page number in either the title or the footnote.

I know that RTF is very picky -- one wrong \ or {} and Word will not open the RTF file. That's why Tech Support is your best bet for more help on this question.

cynthia
[pre]
ods listing close;

***** RTF Example *****;
ods path work.rtftemp(update)
sashelp.tmplmst(read);

proc template;
define style styles.RTFControlWords;
parent=styles.rtf;
style systemtitle from _self /
protectspecialchars=off;
style systemfooter from _self /
protectspecialchars=off;
end;
run;

ods rtf file='c:\temp\regular_page.rtf' style=RTFControlWords;

proc print data=sashelp.shoes(obs=50);
var region product sales;
title j=r '{\field{\pgnucrm{\*\fldinst{\pard\b\i0\chcbpat8\qc\fs19 {PAGE }\cf0\chcbpat0}}}}';
footnote '{\field{\*\fldinst{\pard\b\i0\chcbpat8\qc\fs19\pgnlcrm{PAGE }\cf0\chcbpat0}}}';
run;
ods rtf close;

title; footnote;

[/pre]

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 917 views
  • 0 likes
  • 2 in conversation