GetCOMCollectionObjects()

Summary

Gets the COM objects in a COM collection.

Changes

Added to Version 5.0.

Syntax

com_objects = GetCOMCollectionObjects(comobject my_object)

Argument Contents
my_object The name of the COM collection

Returns

An array of the COMObjects in a COM collection.

Notes

  • GetCOMCollectionObjects() iterates over all the items in the collection and returns them in a single array.

  • This is an alternative to using my_object.item[i] to get at the individual items, and in fact that does not work for all collections, since some are not indexed.

Example

name = GetCOMCollectionObjects("MyCollection")

Error Codes

Error Type Meaning
Error Passed a null value or there is no COM collection

See Also

Function Summary
CloseCOMControl() Closes the window containing the COM control
CreateCOMControl() Creates a new COM control window
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
GetCOMObject() Gets the currently active instance of a COMObject