ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / OLE functions
  • Freeing
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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.
Remark: 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
Name of the Automation server to be found.
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>
Remark: 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.
Component: wd290ole.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help