




 
A symbol bound to each item in the collection in turn.
A form which is evaluated to yield a COM 
i-dispatch
 interface pointer that implements the collection protocol.
A form to be evaluated.
The 
do-collection-items
 macro executes each 
form
 in turn, with 
item
 bound to each item of the 
collection
.
Note that for collections whose items are interface pointers, the 
form
s must arrange for each pointer to be released when no longer needed. The 
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 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)))