Initializes an OLE control with an OLE object. The OLE server is invoked to load the OLE object. The OLE object appears in the control: the control is updated. The server is not started.
Remark: Depending on the server that created the OLE object, the object can be displayed in the control as:
- its bitmap representation. Example: image created with Paint Brush.
- its vector representation. Example: worksheet created with Excel.
- the icon representing the server. Example: WinWord icon.
- text.
// Load the object
OLELoad(OLE_OLE2, "OBJECT1.OLE")
// Process the object
// Save the object
OLESave(OLE_OLE2, "OBJECT1.OLE")
Syntax
<Result> = OLELoad(<OLE control> , <File name>)
<Result>: Boolean
- True if the OLE object was loaded,
- False otherwise.
<OLE control>: Control name
Name of OLE control to initialize. If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used.
<File name>: Character string
Name of OLE object. This object must have been created by OLESave.
Remarks
Finding out the name of the OLE file associated with a control
To find out the name of the OLE file associated with a control, use the following syntax:
FileName = OLE_OLE1 // OLE_OLE1 is the name of the control
Modifying the content of an OLE control
To modify the name of the file associated with a control, use the following syntax:
OLE_OLE1 = FileName // OLE_OLE1 is the name of the control
This line of code is equivalent to OLELoad(OLE_OLE1, FileName).
Displaying the content of an OLE binary memo
To display the content of an OLE binary memo, use the following syntax:
OLELoad(ControlName, DataFileName.ItemName)
For example:
OLELoad(OLE_OLE1, Product.OLEMemo)
Only OLE version 1 is supported.