08-30-2016 11:53 AM
the code below gives a pdf output to a printer but I want to change the output to word or excel.
can anyone help? if i need to change all the code can someone help me with the new code that can truly send an excel or rft output to a printer?
%let device=PDFCT; /*to print pdf*/
/*%let device=LJIVPS; *//*to printer*/
%let targetdevice=LJIVPS; /*dont change the target device*/
%if %upcase(&device) eq LJIVPS or %upcase(&device) eq PDFCT %then %do;
%let page_count=39; /*one less then start page*/
08-30-2016 04:18 PM
You may need to provide more information but generally:
ods rtf file="c:\path\mydocname.rtf";
/* your procedures that generate output. NOTE: DO not direct output to devices directly*/
ods rtf close;
with put the output into an RTF file you specify with the file part of the ODS RTF statement that WORD can read.
Since you are using GDEVICE type statements it is hard to know what other setting you may have that effect output.
Depending on what you are doing you may have appearance issues at the end as ODS Styles will control many of the appearance options.