OLE Objects

OLE objects are objects created with programs that support Microsoft's Object Linking and Embedding technology. The different types of OLE Objects you can link or embed within forms depends upon the applications you have installed on your computer. To some extent, the way these objects behave in Sage 50 may depend upon how the server application (the program that created the object) chose to implement OLE.

When you place a new OLE object on a form in the Forms Design window, you can select from any application that can create an ActiveX object. In some cases, this could be very useful (a chart from Microsoft Excel, a bitmap of your logo, seasonal messages from a word-processing application).

However, in some cases you may have applications available that would create objects not practical to include on a form. Obviously, we cannot explain every scenario you will encounter here; you will have to experiment and use your imagination. See an example of linking a bitmap as a background image.

To Embed or to Link?

An embedded object is static: it will always stay the same once you place it on a form. The only way to update it is to delete it and replace it. A linked object is dynamic: it will reflect changes made to the originating file. You have the choice to update linked objects manually or automatically.

If an OLE object you are placing isn't likely to change (a bitmap of your company logo, a Word file of your company slogan), then you should embed it. If it is likely to change (seasonal messages, a table of your employees), you should link it.

Make sure that the drawing area or the margins around the OLE object are small in the server application. In a paint application, you'd want to crop the image to include only the area you wanted to display on the form. In a word-processing application, make sure there are no unnecessary paragraph returns after the desired text.

Note: Graphic OLE objects will slow down the printing process because they use more memory and the graphics capabilities of your printer.

To insert an OLE object

  1. Click the OLE object tool. The Insert Object window appears.

    Create New: If you're creating a new object from scratch, select the object type from the list. (The object type is the output of a server application on your hard drive. The description in the list is supplied by the server application. It may not be clear which application creates this object, or even the function of the object.) The application is opened. Create the file and save it according to the application's documentation. When you save, you return to the Forms Design window.

    Create from File: If you're linking or embedding an existing object, select Create from File and enter or browse for the file name.

    Link: If you want the object to be linked, so it can be updated when the originating file is updated, then select the Link check box. If you want it to be embedded, or remain the same, clear the Link check box.

    Note: A linked object has a dotted border (if you have turned on Outline OLE Objects in Forms Design options). An embedded object has a solid border.

Updating a Linked Object

By default, linked objects are set to be updated automatically. That means that every time the form is opened, Sage 50 will read the file on your hard disk. Any updates to the file will then be reflected on the form. (Note that if the form is open in the Forms Design window, and you save the object in the server application, the object won't be updated on the form until you close the form and reopen it.)

You can choose to update linked objects manually. To manually update an object, right click the linked object, select Properties, then the Link tab. (Note that this is where you select to update manually or automatically.) Select the Update Now button.

Breaking a Link

On the Link tab of the Properties window, you can choose to break the link on a linked object. This in effect converts a linked object to an embedded object, with the following exception: You can double-click on an embedded object and update it using the menus and tools from the server application. You cannot update an object for which the link has been broken. It will continue to print, but to update it, you would have to delete it, update it in the server application, then embed or link it again on the form.

To resize an OLE object manually

While you can resize an OLE object in the Forms Design window, in almost all cases it is better to resize the object in the server application. Otherwise, the object may become distorted.

What do you want to do next?