BookmarkSubscribeRSS Feed
_Levi_
Calcite | Level 5

Hello,

I am working in SAS 9.4 (TS1M7) within Linux. I am trying out the TOC options with the ODS WORD statement and noticed that nothing shows up in the table besides the title "Table of Contents". I closed and re-opened the SAS session and tried a simple example but still nothing showed up. Anyone have ideas how I can get the contents to print within the Table of Contents?

 

ods word file="~/ibm/toc_text.docx" options(contents="on" toc_data="on");
title "t1";
title2 "t2";
ods proclabel="test";
proc print data=sashelp.air noobs label;
run;
ods word close;

 

2 REPLIES 2
Quentin
Super User

I found this paper by the developer of ODS Word (I think)

 

https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4265-2020.pdf

 

I ran it on 9.4M7 windows, I can see the "Table of Contents" heading and a field:  {TOC \f C \h \z}

 

If I hit Alt-F9 in Word, it will display the actual table of contents instead of the field code.

 

 

 

 

 

BASUG is hosting free webinars Next up: Mark Keintz presenting History Carried Forward, Future Carried Back: Mixing Time Series of Differing Frequencies on May 8. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 211 views
  • 0 likes
  • 3 in conversation