If you select an OLE server or document, the three options "OLE server", "OLE object" and "Existing OLE object" imply a number of restrictions when using Natural and when using the server application.
This document covers the following topics:
Before you select an entry, decide if this is what you need.
Type | Characteristics |
---|---|
OLE Server | Creates an OLE object in its native form. Either server with no content ("Create New") or server with existing file as content ("Create from File"). |
New OLE Object | Creates a new OLE embedded object to be stored within the Natural environment (default file extension ".neo"). Only "Create New" allowed. |
Existing OLE Object | Creates an existing OLE embedded object that has been stored within the Natural environment (default file extension ".neo"). Only "Create from File" allowed. |
If you have selected the "OLE server" entry
Select the "..." button to the right of the drop-down combo box.
The "Select OLE Server or Document" dialog box appears. Here you have two options:
The "Create New" radio button enables you to select a server application to be started when the end user activates the OLE container control at runtime. The server application is started as such, with no file loaded into it.
The "Create from File" radio button enables you to insert the contents of a file as an OLE object. You can browse for the file. When the end user activates the OLE container control at runtime, the application used to create the file is started as a server application, with the content being the selected file.
Either select "Create New".
Or select "Create from File".
If you have selected "Create New", proceed with 3a.
If you have selected "Create from File", proceed with 3b.
3a. - From the "Object Type" list box, select an application, for example "Microsoft Word 6.0 Document".
3b. - In the file text box, enter the path of the file you want to select.
Or, if you are not sure where the file is, choose the "Browse" button to search in your environment.
Select the "Display as Icon" check box or not. This lets you decide whether you want to display your application or file as an application icon inside the OLE container control or whether you want your application or file to appear as a text string called <<applicationname>> or <<pathname>>. Both act as a placeholder for the server application.
If you choose to display the application or file as an icon, you can customize the icon by selecting the "Change Icon..." button.
To save your settings and quit the dialog box, select OK.
Or select "Cancel" to quit without saving.
To edit an OLE object inside an OLE container control at runtime
Prerequisite: you have selected "OLE server".
Select and hold down the right mouse button inside the OLE container control's rectangle.
The pop-up menu specific to your server application appears, saying for example:
Edit object-typeObject; or
object-type Object with the submenus "Edit" and "Open".
"Open" activates the server application in a separate window and enables you to edit and save the object. You can then quit the server application and return to Natural. "Edit" lets you activate the server application inside your Natural dialog.
Make your selection in the pop-up menu.
Edit (and save) your object using the menu entries provided by the OLE server application.
To quit the OLE server application at runtime
If you have chosen "Edit":
Select outside the OLE container control's rectangle.
The OLE server application is deactivated in the Natural dialog, but the object is still displayed inside the OLE container control.
To quit the OLE server application at runtime
If you have chosen "Open":
From the OLE server application's menu, select "File", then "Close and Return to container-application-name".
The object is unloaded from the OLE server application in the separate window, but the object is still displayed inside the OLE container control.
New OLE Object
If you have selected the "New OLE object" entry, do the following:
Select the "..." button to the right of the drop-down combo box.
The "Select OLE Server or Document" dialog box appears. Important: Here you may only select "Create New", even though the other option is not disabled.
Select "Create New".
From the "Object Type" list box, select an application, for example "Microsoft Word 6.0 Document".
Select the "Display as Icon" check box or not. This lets you decide whether you want to display your object as an application icon inside the OLE container control or whether you want your object to appear as a text string called <<applicationname>>.
If you choose to display the application or file as an icon, you can customize the icon by selecting the "Change Icon..." button.
To save your settings and quit the dialog box, select OK.
Or select "Cancel" to quit without saving.
You have returned to the attributes window. Note that your server's name now appears in the "Name" text box, prepended by an "@". This is the current value of the SERVER-PROGID attribute. The OK button is disabled. Instead, the "OK & Start Server" button is enabled.
Ensure you have made all choices in the attributes window.
Choose "OK & Start Server".
Your attributes window settings are saved and the server application is started.
Create your OLE object.
Quit the server application. The server application usually provides the menu entries "File", then "Close and Return to container-application-name".
A file list box called "Save As" appears.
Save the file as a Natural embedded object with the default file extension ".neo".
If your end user has edited your new OLE object at runtime
To edit it in-place, the server application provides additional entries to the Natural application's menu bar.
To quit the server application, the server application usually provides the menu entries "File", then "Close and Return to container-application-name".
Note:
Depending on the server application, you might have to set the
focus back to Natural as the server applications usually remain active.
A file list box called "Save As" appears.
The end user must save the file as a Natural embedded object with the default file extension ".neo".
Existing OLE Object
If you have selected the "Existing OLE object" entry:
Select the "..." button to the right of the drop-down combo box.
The "Select existing Natural Embedded Object" dialog box appears. It displays all Natural embedded objects with the default file extension ".neo" in the default directory.
Select a file.
Both the OK and the "OK & Start Server" buttons are enabled. You now have two options:
If you quit the attributes window by selecting OK, the embedded object will be shown in the container, but cannot be modified (read-only).
If you quit the attributes window by selecting "OK & Start Server", the corresponding server application is started and the chosen object can be modified (read-write).
Choose "OK & Start Server".
Or choose OK.
Your attributes window settings are saved and the server application is started.
Modify your OLE object (if you have chosen "OK & Start Server" and the object is read-write).
Or look at your OLE object (if you have chosen OK and the object is read-only).
Quit the server application. The server application usually provides the menu entries "File", then "Close and Return to container-application-name".
A file list box called "Save As" appears.
If you confirm the default, the file is automatically saved as a Natural embedded object with the default file extension ".neo".