BookmarkSubscribeRSS Feed
tburus
Obsidian | Level 7

I am creating a custom ToC in an ODS RTF output using tags (similar to this paper). Unfortunately, my ToC is rather lengthy and would need to cover multiple pages. However, when I press Ctrl+A, F9 in Word, the ToC gets smashed into one page and overflows. I cannot figure out how to get it to insert a page break. Please advise.

 

Example of how ToC is being built:

/* page 3 */
proc odstext pagebreak=yes;
	h "{\scaps Contents}" / style={fontfamily='Arial' fontweight=bold font_size=12pt just=c};
run;

ods rtf text="{\field{\*\fldinst {\\TOC \\f \\h} } }"; run; 

/* Section I */
proc odstext pagebreak=yes;
	h "^20n {\tc \tcl1{\scaps I. Introduction & Methodology}}" / style={fontfamily='Arial' fontweight=bold font_size=12pt just=c};
run;

/* Section I Content */
proc odstext pagebreak=yes;
	h "{\tc \tcl2{\scaps 1.1 Project Overview}}" / style={fontfamily='Arial' fontweight=bold font_size=10pt just=l};
	p ;
	p "text";
run;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Well, what is the RTF method for doing a page break? Since you're using RTF control strings for the TOC entries, my guess is that you'll need RTF control strings for the page break you want to insert. Once you know what that is, you can use it in your code just as you are writing the other RTF control strings. Or else, you might want to work with Tech Support because they can look at ALL your code with ALL your data that generates the long TOC and they can help you if there is a SAS solution.
Cynthia

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 465 views
  • 0 likes
  • 2 in conversation