I am importing information from an excel file to do a document merge into a letter using a letterhead template. Then I want to export that letter into several separate .RTF files to have separate letters to send out via email. I have been able to create a merged master file on letterhead containing all of the pages using all of the records from the excel file (which I put into a multi page .RTF file called MEMO.rtf): filename word DDE 'Winword|system' lrecl=1000;
options noxwait noxsync;
filename watermrk "N:\Letterhead.doc";
%let rc=%sysfunc(system(start winword));
data _null_;
file word;
put '[FileOpen.Name = "' "N:\Letterhead.doc" '"]';
put '[Insertfile .Name ="' "N:\MEMO.rtf" '" ]';
put '[FilePageSetup '
'.Orientation =0,'
'.PageWidth ="8.5 in ",'
'.PageHeight ="11.5 in ",'
'.TopMargin ="1 in ",'
'.BottomMargin ="1 in ",'
'.LeftMargin ="1 in ",'
'.RightMargin =1 in "]';
run; I am getting stuck at how to parse out the multiple records into multiple RTF files. help!
... View more