PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Freeing
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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.
Note: This function is used to avoid starting a new session of the application to control if this one is already started on the current computer.
Excel is dynamic Automation object
// If Excel is already started, use this program
Excel = GetActiveObject("Excel.Application")
IF Excel = Null THEN
        // Start Excel
        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 (with quotes)
Name of the Automation server to find.
Remarks

Freeing

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 freed at the end of the variable lifetime (when closing the window for example) or during a new allocation of the object.
Components
WINDEVReports and Queries wd230ole.dll
See also
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment