Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

OLE objects in DataWindow objects – PB Docs 2021 – PowerBuilder Library

OLE objects in DataWindow objects – PB Docs 2021

OLE objects in DataWindow objects

The preceding sections discuss the automation interface to OLE
controls and OLE objects. You can also use scripts to change settings
for an OLE object embedded in a DataWindow object, and you can address
properties of the external OLE object.

This section describes how to use the Object property in dot
notation to set DataWindow properties and issue automation commands for
OLE objects in DataWindow objects.

Naming the OLE object

To use dot notation for the OLE object, give the object a name.
You specify the name on the General page in the object’s property
sheet.

Setting properties

You set properties of the OLE container object just as you do for
any object in the DataWindow object. The Object property of the control
is an interface to the objects within the DataWindow object.

For example, this statement sets the Pointer property of the
object ole_word:

It is important to remember that the compiler does not check
syntax after the Object property. Incorrect property references cause
runtime errors.

For more information about setting properties, handling errors,
and the list of properties for the OLE DWObject, see the section called “Properties for OLE Object controls in DataWindow
objects”
in DataWindow Reference.

OLE objects and the Modify function

You cannot create an OLE object in a DataWindow object
dynamically using the CREATE keyword of the Modify function. The
binary data for the OLE object is not compatible with Modify
syntax.

Functions and properties

There are four functions you can call for the OLE DWObject. They
have the same effect as for the OLE control. They are:

  • Activate

  • Copy

  • DoVerb

  • UpdateLinksDialog

To call the functions, you use the Object property of the
DataWindow control, just as you do for DataWindow object
properties:

Four properties that apply to OLE controls in a window also apply
to the OLE DWObject.

Property

datatype

Description

ClassLongName

String

(Read-only) The long name for the server
application associated with the OLE DWObject.

ClassShortName

String

(Read-only) The short name for the server
application associated with the OLE DWObject.

LinkItem

String

(Read-only) The entire link name of the item to
which the object is linked.

For example, if the
object is linked to C:FILENAME.XLS!A1:B2, then LinkItem would
contain C:FILENAME.XLS!A1:B2.

ObjectData

Blob

If the object is embedded, the object itself is
stored as a blob in the ObjectData property.

If the
object is linked, this property contains the link information
and the cached image (for display).

Automation

You can send commands to the OLE server using dot notation. The
syntax involves two Object properties:

  • The Object property of the DataWindow control

    Gives you access to DataWindow objects, including the OLE
    container DWObject

  • The Object property of the OLE DWObject

    Gives you access to the automation object

The syntax is:

For example, this statement uses the WordBasic Insert function to
add a report title to the beginning of the table of data in the Word
document:


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