SetAutomationPointer – PB Docs 2017

SetAutomationPointer

PowerScript function

Description

Sets the automation pointer of an OLEObject object to the value of
the automation pointer of another object.

Applies to

OLEObject

Syntax

Argument

Description

oleobject

The name of an OLEObject variable whose automation pointer
you want to set. You cannot specify an OLEObject that is the
Object property of an OLE control.

object

The name of an OLEObject variable that contains the
automation pointer you want to use to set the pointer value in
oleobject.

Return value

Integer.

Returns 0 if it succeeds and -1 if the object does not contain a
valid OLE automation pointer.

Usage

SetAutomationPointer assigns the underlying automation pointer used
by OLE into a descendant of OLEObject.

Examples

This example creates an OLEObject variable and calls
ConnectToNewObject to create a new Excel object and connect to it. It also
creates an object of type oleobjectchild (which is a descendant of
OLEObject) and sets the automation pointer of the descendant object to the
value of the automation pointer in the OLEObject object. Then it sets a
value in the worksheet using the descendant object, saves it to a
different file, and destroys both objects:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x