Using ActiveX Enum Constants and Visual LANSA

Date: Archived
Product/Release: Visual LANSA
Abstract: Using MS Outlook ActiveX and ENUM Constants in a Visual LANSA Application
Submitted By: LANSA Technical Support

For details on using ActiveX Controls and how to integrate with ActiveX Enabled Applications please review the Online Documentation – Visual LANSA Components – Using ActiveX Controls.

This tip is to show (and to provide an example) of ActiveX ENUM Constants being used in a Visual LANSA Application.

This method uses ENUM constants, which have to be prefixed with the Component Name and without the hash (#) sign eg. For an MS Outlook ActiveX Control enrolled in Visual LANSA as VAOUTLOOK and ENUM Constant olMailItem use the following method.

INVOKE METHOD(#olApp.CreateItem) ITEMTYPE(vaoutlook.olMailItem) CREATEITEM_RETVAL(#olDispatch)

A sample program which Creates a Contact, creates an appointment and sends an email to the new contact using MS Outlook can be downloaded from the following link.

Sample Code (TXT 5KB)