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). For example:

DEFINE VARIABLE hExcelObject AS COM-HANDLE NO-UNDO.

CREATE "Excel.Application" hExcelObject.

The following figure summarizes the basic logic for this option.

Figure 1. Automation connection option 1


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