|Date: ||Thu, 24 Jul 1997 17:41:30 +0200|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||Wim Van Doren <Wim.VAN-DOREN@DG19.CEC.BE>|
|Subject: ||Re(2): Help: I have some problems with SAS 6.12|
|Content-Type: ||text/plain; charset=us-ascii|
I already sent an 'answer' to this question(s), but I had a few minutes to play, so I reworked my OLE automation example to use the new syntax (and the new objects of Word 97).
Here it is.
/* DEMO of AUTOMATION of Word 97 */
/* Get an automation object for WORD 97 */
/* got it ? */
if word_obj then do;
/* Show yourself */
/* I want the Collection 'Documents' */
/* I want a new document, so lets add one to the collection, it returns the new document */
/* Ask our new document about its content property (its a Range object), */
/* so we can insert text */
/* Add text to the Range */
call send(content,'_do_','InsertAfter','Hello From SAS/AF');
/* Get rid of Word, dont save the document, dont bother user */
call send(word_obj,'_do_','Quit',0 /* wdDoNotSaveChanges */);
/* _term_ the topmost automation objet, it will delete all its child */
As with the previous example, you need to paste this in a SCL entry, compile in debug mode, and step through it. (it is interresting to do a 'putlist word_obj' before _term_ is called).
I Gathered the info about all these objects from the Word 97 online help.
But it can be tedious... ;-)
Solid Partners N.V.