|Date: ||Thu, 18 Mar 2004 09:17:55 -0500|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Michael Bramley <bramley.michaelp@KENDLE.COM>|
|Subject: ||DDE/WORD Query|
|Content-Type: ||text/plain; charset="us-ascii"|
I have been away from the list for awhile, and would appreciate a direct
reply as I am on digest mode.
I trust this still meets the L-etiquette that I recall from before.
I'm inserting a couple of text files into word via SAS and a DDE
connection (I know--old, unsupported, etc.). I have noticed that extra
lines are appearing in the WORD document that are not in the original text
files. Has anyone else encountered this issue before (and more
importantly, know if there is a programmatical manner to correct for it).
I suppose I could search/replace, but that does not appeal to my
curiousity. I have tried placing sleep(x), adding @ to the end of put
stmts, etc . all to no avail.
The code that I am using follows (with appropriate snips for brevity):
Filename FToWord DDE 'WINWORD|SYSTEM' ;
%Let WordFile = Temp.doc ;
Data _Null_ ;
File FToWord ;
Put '[FilePageSetup .PaperSize = "0", .Orientation = 1]' ;
Put '[InsertFile.Name="File1.txt"][InsertBreak]' ;
Put '[InsertFile.Name="File2.txt"][InsertBreak]' ;
Put '[InsertFile.Name="File3.txt"][InsertBreak]' ;
Put '[EditSelectAll]' ;
Put '[Font "Courier New"]' ;
Put '[FontSize 8]' ;
Temp = '[FileSaveAs "' || "&WordFile" || '"]' ;
Put Temp ;
Any help would be most graciously appreciated.