The following syntax describes either a basic assignment (=) statement for invoking a COM object method that returns a value or the basic statement for invoking a COM object method directly that ignores any returned value:

Syntax

{ field } = 
  Com-Handle-Var:Method-Name( [ param [ , param ] ... ] ) 
  [ NO-ERROR ]
Com-Handle-Var:Method-Name( [ param [ , param ] ... ] ) 
  [ NO-ERROR ]
field
Any ABL variable, database field, class-based data member or property, or handle attribute of a compatible data type. This can also be a COM object property (see COMProperty).
Com-Handle-Var
Any COM-HANDLE variable set to the handle of an instantiated COM object.
Method-Name
The name of the method to invoke.
param
The following syntax describes how to specify a parameter for a COM object method:
 { [ OUTPUT | INPUT-OUTPUT ] expression [ AS Data-type ] 
  [ BY-POINTER | BY-VARIANT-POINTER ] } 
expression
Can be any valid ABL expression or data element.
Data-type
A supported COM data type that is compatible with the expression. For information on COM data types and on OUTPUT, INPUT-OUTPUT, BY-POINTER, and BY-VARIANT-POINTER, see Data-type.

There is currently no support for named parameters, for example: Method-Name(Color="GREEN", Shape="SQUARE").

If a parameter is optional you may omit it from the parameter list, but you still need to retain the comma to indicate its position. For example, ComObject:ComMethod(param1,param2,,,param5).

NO-ERROR
Allows the application to handle any error condition raised by the statement.
Note: You can optionally chain COM object references.