GetCOMObject()
Summary
Gets the currently active instance of a COMObject.
Changes
Added to Version 5.0.
Syntax
com_object = GetCOMObject(string progid, array options)
| Argument | Contents |
|---|---|
| progid | The name of the COM object |
Returns
A COMObject.
Notes
- CreateCOMObject()
-
For more information on COM objects, see Accessing COM Objects.
Example
excObj = GetCOMObject("Excel.Application", )
Error Codes
| Error | Meaning |
|---|---|
| NotFound | The specified progid is not registered, or no active objects of that type were found |
See Also
| Function | Summary |
|---|---|
| CreateCOMControl() | Creates a new COM control window |
| CreateCOMObject() | Creates a new instance of a COMObject |
| GetCOMCollectionObjects() | Gets the COM objects in a COM collection |
| GetCOMControlObject() | Gets the COM interface of a COM control window |
| GetCOMInterfaceName() | Gets the name of the COM interface for an object from the type library |