CreateObject (NotesUIDocument - LotusScript®)

In a document in Edit mode, creates an OLE object in the current rich-text field.

Note: CreateObject is not supported under UNIX, or on the Macintosh.

Defined in

NotesUIDocument

Syntax

Set handleV = notesUIDocument .CreateObject( [ name$ [ , type$ _ [ , filePath$ ] ] ] )

Parameters

name$

String. Optional. The name you want to use to refer to the object.

type$

String. Optional. The type of object that you want to create. The type that you specify must correspond to an entry in the OLE registry and is case-sensitive. The method creates an empty instance of the specified object type. If you specify a type, you must omit the filePath$ parameter.

filePath$

String. Optional. The path and file name of the source document that you want to use to create an object. The method creates an object from the file. If you specify a file path, you must specify an empty string ("") for the type$ parameter.

Return value

handleV

Variant. A handle to the OLE object.

Usage

You must specify either a type$ or a filePath$, but not both. If you specify a filePath$, you create the object in a rich-text field. You must, however, code a GetObject statement to give LotusScript® a handle on the object.

The current document must be open in Edit mode and the cursor must be in an editable rich-text field.

With no parameters, this method displays the Create Object dialog box, which allows the user to select the object to create.