Inserting Objects

Users can insert any Component Object Model (COM) object such as an Excel spreadsheet, a bitmap, or a Word document into a rich text control, by either embedding or linking to it.

An embedded object is edited within the rich text control itself and a linked object is edited in the source file location. The COM object can be displayed as a view of the object or as an icon representing the program that runs the inserted object (for example, Paintbrush or Word for Windows).

Double-clicking an inserted object activates its server.

If an object is selected and the context menu is displayed, the verb submenu of the selected object is displayed as a submenu of the Object menu item.

To insert an object into a rich text control

  1. Right-click in the position at which you want to insert the object in the control. The context menu is then displayed.

  2. Select the Insert Object command. The OLE Insert Object dialog is then displayed.

  3. Select the Create New option button if you want to create a new COM object.

    The Object Type drop-down list then displays all COM object types so that you can select the type of object. The appropriate program executable for that object type is then invoked so that you can create the object that you want to insert (for example, Paintbrush if you selected Bitmap Image or Microsoft Excel if you selected Microsoft Excel Chart).

  4. If you want to insert an existing object (the default), in the File text box specify the name of the existing file containing the object to be inserted. If you do not specify a path, JADE looks in the current directory and raises an exception if the specified file is not in the directory or if it does not exist.

    If you are unsure of the directory that contains the object, click the adjacent Browse button to display the common Browse for Folder selection dialog that enables you to select the path in which your object file is located.

  5. Check the Link check box if you are inserting an existing object and you want to link to the object in the appropriate file (for example, when editing the object and so that changes to that object are reflected in your rich text control) rather than embedding it within the control itself.

    As inserted objects are embedded by default, this check box is unchecked and it applies only to existing objects.

  6. Check the Display As Icon check box if you want the object inserted as an icon so that the contents of the object are displayed in the control only when you double-click on the icon to activate the program that created it.

    As the contents of an inserted object are displayed within the control rather than displaying an icon for the object type, this check box is unchecked.

  7. Click the OK button. Alternatively, click the Cancel button to abandon your selections.

The selected object is then displayed at the current caret position (the insertion point) in the control, as the full contents of the object or as an icon representing the object.

To change the view of the object (that is, display it in the control as an icon view or the full contents view), right‑click on the object in the rich text control and then select the Object Properties command on the context menu.

The OLE Properties dialog for that type of object then enables you to change the way in which the object is inserted.