Good morning,
We are generating in SAS an RTF file in which we are creating a table of contents.
For the table of contents to appear we have to select the entire document and press F9.
The important thing is that we want to remove that manual, we want the automatic table of contents to come out.
Do you know any way to do it? thanks greetings
ods rtf text= "~S={outputwidth=100% just=l}{\field{\*\fldinst {\\TOC \\f \\h} } }"; ods RTF text="{\tc {\b\fs18\ql {Tabla &v_num..- MATRICULACIONES POR TIPOS DE VEHÍCULOS} \par}}";run;
The Table of Contents will not automatically be populated. You will need to do this as documented below:
produces a table of contents page for RTF documents that are opened in Microsoft Word. The table of contents page contains a Table of Contents field, which puts all of the contents information that is embedded in the document into a table of contents. To expand the table of contents, right-click under the title in Microsoft Word and select Update Field from the selection list.
Also see:
https://support.sas.com/kb/24/050.html
Thank you very much for the reply.
What we need is that the rtf report appears with the index/table of contents without updating the file when opening it.
In the link you sent me you have to update the references.
Thank you very much for your answer.
For security, XCMD is not activated in our SAS.
we can't run scripts.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.