| Date: | Thu, 18 Mar 2004 09:17:55 -0500 |
| Reply-To: | bramley.michaelp@KENDLE.COM |
| 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" |
|---|
SAS-L:
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.
The problem:
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 ;
/*
Setup Layout.
*/
Put '[FilePageSetup .PaperSize = "0", .Orientation = 1]' ;
*...<snip> ;
Put '[InsertFile.Name="File1.txt"][InsertBreak]' ;
Put '[InsertFile.Name="File2.txt"][InsertBreak]' ;
Put '[InsertFile.Name="File3.txt"][InsertBreak]' ;
*....<snip>;
/*
Format document.
*/
Put '[EditSelectAll]' ;
Put '[Font "Courier New"]' ;
Put '[FontSize 8]' ;
Temp = '[FileSaveAs "' || "&WordFile" || '"]' ;
Put Temp ;
Stop ;
Run ;
Any help would be most graciously appreciated.
TIA.
Sincerely,
Michael Bramley
|