Accessing Target Object Collections

Access to target object collections is supported at both the COM level and the Automation level.

To Use
Include an object in a collection Add method of the ItargetObjectCol interface.
Exclude an object from a collection Remove method of the ItargetObjectCol interface.
Enumerate the objects within a target object collection Automation: the syntax targetObjectCollection(index), as for retrieving an item from any Automation collection.

COM: the get_Count and get_Item methods of the ITargetObjectCol interface, or use the _NewEnum method of the ItargetObjectCol interface to obtain a standard enumerator interface for the collection.