Date: Mon, 29 Jan 2001 09:20:05 -0500
Reply-To: "King, Raymond" <raymondk@OTSUKA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "King, Raymond" <raymondk@OTSUKA.COM>
Subject: Q: Running Word VB macro via DDE and System topic
Content-Type: multipart/mixed;
All,
Is there a way to execute a VBA macro created in Word 97 from SAS via dde
using the System topic? There aren't any examples of doing this on the SAS
support site. None that I could find anyway!
a la -
/*** Start Example ***/
options noXwait noXsync ;
filename wordCMD dde "winword | system" ;
... open word doc using X command and put SAS to sleep until document is
loaded ...
data _null_ ;
file wordCMD ;
put '["doc_name.mymodule.VBA_Macro_Name.Run()"]';
put "[error(false)]" ;
put "[close()]" ;
put "[quit()]" ;
run;
/*** End ***/
This is all tied to trying to create PDF files from SAS 6.12 TS060.
The plan is to:
1) Create output .LIS files from SAS,
2) open those files in Word,
3) run a macro to Print to a postscript (.ps) file using the Adobe Distiller
driver, and
4) distill the postscript files to .pdf files.
A SAS program will act as the batch driver by reading in a list of all .LIS
files in a directory, and then use a SAS Macro to execute the above steps
for each file.
Any insights would be appreciated and links to more information are welcome.
TIA,
Raymond
===============================
Raymond King
Project Leader, Scientific Programming
Otsuka Maryland Research Institute, LLC
800-562-3974, Ext. 2155
301-721-7155 (Fax)
RaymondK@otsuka.com
<<King, Raymond.vcf>>
King, Raymond.vcf [application/octet-stream]