Iterates over the items of an Automation Collection.
com
do-collection-items (item collection) form*
item⇩ |
A symbol bound to each item in the collection in turn. |
collection⇩ |
A form which is evaluated to yield a COM i-dispatch interface pointer that implements the collection protocol. |
form⇩ |
A form to be evaluated. |
The macro do-collection-items
executes each form in turn, with item bound to each item of collection.
Note that for collections whose items are interface pointers, forms must arrange for each pointer to be released when no longer needed.
collection should be a COM interface pointer for an i-dispatch
interface that implements the Collection protocol. The items are converted to Lisp as specified in 3.3.3 Data conversion when calling Automation methods.
For example, to iterate over the Table
objects from the Tables
collection of a MyDocument
interface pointer:
(with-temp-interface (tables) (call-dispatch-get-property (doc my-document tables)) (do-collection-items (table tables) (inspect-the-table table) (release table)))
COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:41