Calling Object Methods

Use

There are two syntax forms when you call object methods:

Syntax 1:

        
<Objektmethode> = <Variable>
         

Syntax 2:

        
<Objektmethode> <Exportvariable 1>.. <Exportvariable 5>
         

<Objektmethode> is a name defined by the OLE application, whereas <Variable>, <Exportvariable 1>.. <Exportvariable 5> represents the occurrence of transferred variables. Export variables are used for transmitting values to the OLE object (similar to setting object attributes).

Syntax Variant 1

From a functional point of view, the syntax variant 1 is a sub-case of the syntax variant 2, because it can transfer only one variable. OLE applications do not provide alternative syntax variants, but generally only provide one form.

The syntax variant 1 allows the following functions:

  • Call an object method with an import variable

  • Create a new (sub-)object from the current object.

Syntax Variant 2

Syntax variant 2 allows you to call an object method with up to five export variables.

Subobjects

You can also call object methods that do not refer to the global object but to a subobject of the application. This object must first be created. Then the properties can also be edited there. The corresponding syntax is then:

          
<Objekt>.<Objektmethode> = <Variable>
            

or

          
<Objekt>.<Objektmethode> <Exportvariable 1>.. <Exportvariable 5>
            

Variable Exchange

Unnecessary variables (see list of OLE parameters in Syntax: OLE Automation) can be used for the variable exchange between OLE calls.