InsertFile
PowerScript function
Description
Inserts an object into an OLE control. A copy of the specified file
is embedded in the OLE object.
Syntax
|
1 |
olecontrol.InsertFile ( filename ) |
|
Argument |
Description |
|---|---|
|
olecontrol |
The name of the OLE control. |
|
filename |
A string whose value is the name of the file whose |
Return value
Integer. Returns 0 if it succeeds and one of the following negative
values if an error occurs:
-1 — File not found
-9 — Other error
If any argument’s value is null, InsertFile returns null.
Usage
The contents of the specified file is embedded in the OLE object.
There is no further link between the object in PowerBuilder and the
file.
Examples
This example creates a new OLE object in the control ole_1. It is an
Excel object and contains data from the spreadsheet EXPENSE.XLS:
|
1 2 |
integer result result = ole_1.InsertFile("c:xlsexpense.xls") |
See also