Iterates through Documents collections, successively returning each Document object. Multiple DocumentIterator objects can be active on the same collection. Each iterator maintains its own internal position and does not affect the state of the Documents collection over which it is iterating.
Creates an independent DocumentIterator instance. The clone starts at the position last access by the original iterator. Use Clone() to save a position before calling Skip or Reset.
Returns the next document in a collection, or nothing after the last document.
Resets iteration to the collection beginning so that Next() returns the first document.
Skips the next NumDocuments documents. Skip does nothing if there are not NumDocuments documents left to skip, or if NumDocuments < 0.
Both DocumentIterator and IEnumVARIANT (obtained from the Documents collection's _NewEnum method) provide Documents collection iteration. DocumentIterator objects are accessible in all development environments while IEnumVARIANT is a COM interface inaccessible in environments such as Delphi. The usual alternative to IEnumVARIANT is:
for i:= 1 to Count
This does not work with large collections, such as Documents, which do not support Count or Item.
The DocumentIterator object does not support refresh.