Release 10.1A: OpenEdge Development:
Programming Interfaces

> ## Option 4: connect to or instantiate implied Automation object and file

> This option creates a connection to a new or existing instance of the Automation object implicitly defined by the specified file. This option identifies the Automation object and its Server from the specified filename extension, as defined in the registry. If the file is not already open in the Automation Object, it will be opened. In this example, the `.xls` extension indicates that the object instance is a Sheet object provided by the Excel Automation Server:

>     DEFINE VARIABLE hExcelObject AS COM-HANDLE
>     CREATE "" hExcelObject CONNECT TO "\WorkSheets\Xplan.xls".

> Figure 15–4 summarizes the basic logic for this option (ignoring the listed error conditions):

> Figure 15–4: Automation connection option 4

> Note: This option is equivalent to the Visual Basic GetObject(pathname) function call.

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