Home/ Reference/ Application

app.Documents

Collection of every open document. The i-th one is app.Documents.Item(i); the total is app.Documents.Count.

Signature

app.Documents

Notes

Collection of every open document. The i-th one is app.Documents.Item(i); the total is app.Documents.Count.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
docs = app.Documents                    # collection of all open documents
print("Open documents: ", docs.Count)        # Count = number of elements

for i in range(1, docs.Count + 1):      # note: CorelDRAW collections are 1-based
    d = docs.Item(i)                    # d : the i-th Document object
    print(i, d.FileName or "unsaved new document")

About this section: Application

Application — the CorelDRAW application object.

Other entries in this section