Progress
External Program
Interfaces


Option 2: Connect To Top-level Named Automation Object

This option creates a connection to an existing instance of a top-level Automation object (such as "Excel.Application"). This does not work with lower-level objects (such as "Excel.Sheet"), and fails if the Server is not already running:

DEFINE VARIABLE hExcelObject AS COM-HANDLE
CREATE "Excel.Application" hExcelObject CONNECT. 

Figure 8–2 summarizes the basic logic for this option.

Figure 8–2: Automation Connection Option 2

NOTE: This option is equivalent to the Visual Basic GetObject(,class) function call.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095