- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a number of SAS programs that produce outputs (e.g. table1_1.SAS, Table2_1.SAS etc) using proc report that produce their respective tables (Table 1.1.RTF and Table 2.1.RTF etc.).
I am trying to merge all outputs (so multiple files produced) into one RTF file and have Microsoft word create a table of contents based on headers.
I've found an old paper on adding MS Word Headers into ODS RTF outputs that is based on SAS 8.2+. I'm sure it would work on the modern SAS 9, but I am wondering if there are more modern approaches.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would definitely redesign my process such that I didn't have to combine multiple RTF files though VBS will do it easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would definitely redesign my process such that I didn't have to combine multiple RTF files though VBS will do it easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'll explore ods word, but however, each code produce its independent table.
BUt yeah, the process I am thinking about is via VBA after adding headers via SAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ods rtf file = '......' style = mystyles;
%include 'generateReport1.sas';
%include 'generateReport2.sas';
...
ods rtf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
log and lst files needs to be saved for each respective program. so the include statement doesn't fully work because of that as I recall.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Tpham ,
The paper you cited is a privative way to answer your request, as @Reeza outlined in this response. You will also have to figure out a way for a cover page or top page to make the TOC visible, something like this:
this is for a large file with many sections which needs a TOC for each section title/header. See this file This is way beyond what SAS ODS RTF REPORT/DOCUMENT is currently doing. Another example for multiple listings/tables with a TOC.
Many Thanks
Jianmin Long