The SAS Output Delivery System and reporting techniques

Bookmarks with out2rtf macro

Reply
N/A
Posts: 1

Bookmarks with out2rtf macro

Is it possible to set up bookmarks while creating the rtf using the out2rtf macro? If so do you have any examples?
SAS Super FREQ
Posts: 8,864

Re: Bookmarks with out2rtf macro

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
Ask a Question
Discussion stats
  • 1 reply
  • 183 views
  • 0 likes
  • 2 in conversation