I have a project that allows the user to open a variable number of documents from 1 to X (and X has no limit), according to his/her needs.
The interesting thing about this is how the code is written; each document is opened, the activity required is completed and then the document is closed. Then the next document is opened. Theoretically, only one document at a time should be open.
During testing, however, one of our testers dutifully "broke" the code and loaded up more documents than InDesign could handle. The interesting thing was that when she brought ID back up, ID assumed that all the documents opened in the previous session needed to be "recovered" and so opened the docs back up. She had upwards of sixty documents open and was required to close each document by hand before she could get back to any meaningful work. I have two questions:
1.) Why, when my code explicitly closes the previous document before opening up the next, does InDesign act like no documents have been closed?
Is there any way around this?
2.) Is there any way that I can, using code, check the number of "recoverable" documents and do something about them if there are more than a certain low number?
TIA!
John