BookmarkSubscribeRSS Feed
Bdjordan
Calcite | Level 5
Is it possible to set up bookmarks while creating the rtf using the out2rtf macro? If so do you have any examples?
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
It looks like %OUT2RTF was written in 1999 and last updated in 2002. I suspect that most of the folks who used to use %OUT2RTF (which takes your LISTING output and converts it to RTF form) have mostly switched to ODS RTF.

My guess is that to accomplish what you want
1) you would have to know the RTF to create bookmarks (for a Table of Contents?)
2) you would have to modify the %OUT2RTF program code (and test it, etc) -- I don't know of any examples that show using a modified version of %OUT2RTF

You might be able to use techniques similar to the ones in this paper
http://www.lexjansen.com/pharmasug/2006/technicaltechniques/tt15.pdf in order to insert bookmarks or you might be able to insert bookmarks by post-processing the RTF file -- after you use the %OUT2RTF. Just a warning -- RTF is very picky about every { } and \ in the RTF file -- if you to down this road, but generate mis-matched control characters, Word will not display the RTF file.

On the other hand, if you were able to switch to ODS RTF techniques, this paper shows how to insert hyperlinks and bookmarks using ODS RTF:
http://www.lexjansen.com/pharmasug/2006/technicaltechniques/tt21.pdf

In addition, ODS RTF supports the CONTENTS= option, which inserts a TOC page into your output and ODS supports the URL= style attribute which allows you to make hyperlinks for table cells. Depending on what you want/need to do, you may have more options with ODS RTF.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1445 views
  • 0 likes
  • 2 in conversation