|
|
|
|
|
GetActiveObject (Function) In french: ObjetActif Allows to use an Automation object already started on the current computer. The application (Word or Excel for example) already started on the computer can be controlled from the WINDEV application directly. Remark: This function avoids having to launch a new session of the application to be controlled if it has already been launched on the current workstation. Excel is object Automation dynamic
Excel = GetActiveObject("Excel.Application")
IF Excel = Null THEN
Excel = new object Automation "Excel.Application"
...
END
Syntax
<Result> = GetActiveObject(<Name of Automation server>)
<Result>: Character string Name of the OLE automation server (if it exists) or NULL if the function failed (server not found). <Name of Automation server>: Character string Name of the Automation server to be found. Remarks The dynamic automation object is automatically destroyed at the end of the process containing its declaration. To explicitly free a dynamic automation object, use the following syntax: Delete <Name of dynamic automation object> Note The dynamic automation object is automatically released at the end of the variable's life (e.g. when the window is closed) or when the object is reallocated.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|