Progress
External Program
Interfaces


Option 1: Instantiate Automation Object by Name

This option creates a connection to a new instance of a specified Automation object, launching the Server if necessary. For top-level Automation objects (such as Excel.Application), this option usually launches a new instance of the Server, unlike for lower-level objects (such as Excel.Sheet, which use the instance created by a top-level object):

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

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

Figure 8–1: Automation Connection Option 1

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


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