LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 3 May 2000 14:53:27 +0100
Reply-To:     "Vyverman, Koen" <koen.vyverman@FID-INTL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Vyverman, Koen" <koen.vyverman@FID-INTL.COM>
Subject:      Re: SAS output to Word97
Comments: To: "List SAS-L (E-mail)" <sas-l@uga.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"

Prasad,

Right, in order to use DDE between SAS and Word, not only must an instance of Word be running, but the Word document to which you want to write must also be open.

You could use something like the following to change Word's default open/save directory and open a specified file (e.g. c:\temp\Whatever.doc):

filename wordsys dde 'winword|system'; data _null_; file wordsys; put '[ChDefaultDir "c:\temp\",0]'; put '[FileOpen .Name="Whatever"]'; run;

Hope this helps, Koen.

--------------------------------- Koen Vyverman Marketing Database Manager Fidelity Investments - Luxembourg Phone : (++352) 250 404 22 63 Fax : (++352) 250 404 22 08 ---------------------------------

> -----Original Message----- > From: prasadp@MY-DEJA.COM [mailto:prasadp@MY-DEJA.COM] > Sent: Wednesday, May 03, 2000 3:23 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: SAS output to Word97 > > > I have been trying to send my output to word using DDE but I > am getting > error message saying that physical file does not exist. I am using SAS > version 7 on Windows NT platform and using MS-Word 97. By the way if I > create a file named test.doc manually and keep it open while I run my > SAS code, I get the output right without any errors. I would like to > know how to make the > code work without opening the file manually. > > My sample log is as follows. > > 67 options noxwait noxsync; > 68 > 69 x 'C:\Program Files\Microsoft Office\Office\winword' > 69 ! ; > 70 > 71 data _null_; > 72 x=sleep(5); > 73 run; > > NOTE: DATA statement used: > real time 5.01 seconds > cpu time 0.01 seconds > > > 73 ! ; > 74 > 75 filename test dde 'winword|c:\test.doc' command; > 76 > 77 data _null_; > 78 file test; > 79 x=sleep(5); > 80 put '[Insert "THIS IS A TEST"]'; > 81 put '[FilePrint]'; > 82 put '[FileSave]'; > 83 put '[FileExit 2]'; > 84 stop; > 85 run; > > ERROR: Physical file does not exist, winword|c:\test.doc. > NOTE: The SAS System stopped processing this step because of errors. > NOTE: DATA statement used: > real time 0.01 seconds > cpu time 0.01 seconds > > ------------------------------------------------------------------- > > Thanks > > Prasad > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >


Back to: Top of message | Previous page | Main SAS-L page