How to add images to an output file in ODS RTF


Here are two ways you can add images to an RTF file.

   proc template;
     define style styles.test;
       parent=styles.rtf;
       style table from table /
             preimage='c:\saslog.jpg';
     end;
   run;

   ods rtf file='temp.rtf' style=styles.test;

   proc print data=sashelp.class;
   run;

   ods rtf close; 

   ods escapechar='^';
   ods rtf file='temp.rtf';

   proc print data=sashelp.class;
     title j=l '^S={preimage="C:\V7image.jpg"} ';
   run;

   proc print data=sashelp.class;
     title;
     title2 'this is a test';
   run;

   ods rtf close; 

See more information about PROC TEMPLATE and the RTF destination.