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;
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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.