Enrolling an ActiveX-Enabled Application

As with ActiveX controls, you need to enrol ActiveX-enabled applications in the LANSA repository as a component before you can use them from your LANSA application.

This section shows you how to enrol an ActiveX-enabled component in the repository using Microsoft Word as an example. To use Microsoft Word through ActiveX you can also use the pre-enrolled component VA_WORD which is  shipped with LANSA.

To enrol Microsoft Word application in the repository, create an ActiveX component Word in the ActiveX components group:

Open the ActiveX Component Browser by clicking on the button with three dots in the ProgID property.

Expand the Other Components list. Scroll down to the Microsoft Word components. Notice that there are components for Microsoft Word versions 2 and 6. Word 2000 (Version 9) components are called Word Application and Word Document, without a version number.

The Application component represents the Word application, the Document component represents a Word document (the document can also be accessed through the application). Enrol the Word Application.

Click OK to specify the ProgID. Notice that the TypeLibId is not filled in. (Whenever possible, the type library information is filled in automatically by LANSA.) If you now display the Source view of the component, you notice that the BEGIN_COM statement shows an error telling the type library has not been specified.

To specify the type library, click on the TypeLibId property in the Details tab and then click the button with three dots. The ActiveX Type Library Browser window is displayed. Select the Microsoft Word 9.0 Object Library as the type library.

Save the component.