Previous Page | Next Page

SCL Methods for Automating OLE Objects under Windows

_NEW_



Creates a new instance of an OLE automation server.
Syntax
Details
Example

Syntax

CALL SEND(OLE-instance,'_NEW_',new-OLE-id,init-arg,OLE-auto-app);


Details

Before you can use SCL code to refer to an OLE Automation server, you must first create an instance of the OLE Automation class.

For more information about the _INIT_ method, see the description of the Object class in the online documentation for SAS/AF software.


Example

The following example creates a new instance of an OLE Automation server and assigns the SCL identifier exclauto to the new object. Note that in this example, Excel.Application.8 is the identifier for Microsoft Excel in the system registry:

hostcl=loadclass('sashelp.fsp.hauto');
call send (hostcl, '_NEW_', exclauto, 0, 
           'Excel.Application.8');

Previous Page | Next Page | Top of Page