SCL Methods for Automating OLE Objects under Windows |
Syntax | |
Details | |
Examples |
Syntax |
CALL NOTIFY(OLE-object-name,'_COMPUTE_',in-OLE-method<,in-parm...,in-parm>,out-value); |
CALL SEND(OLE-object-id,'_COMPUTE_',in-OLE-method<,in-parm...,in-parm>,out-value); |
Details |
The _COMPUTE_ method invokes a method (with parameters) that is exposed by an OLE automation server. The number of parameters (in-parm arguments) needed varies among different objects and methods. Only methods that have a return value should be used with the _COMPUTE_ method. For methods with no return values, use the _DO_ method.
Examples |
The following example stores the contents of the item in position 2 of an OLE control in the variable item2obj:
length item2obj $ 200; call notify('oleobj', '_COMPUTE_', 'GetItem', 2, item2obj);
The following example uses the cells method of a spreadsheet object to compute the location of the cell at row 2, column 5, and then sets the value of that cell to 100:
call send(oleobj, '_COMPUTE_', 'Cells', 2, 5, cellobj1); call send(cellobj1, '_SET_PROPERTY_', 'Value', 100);
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.