This content has been marked as final. Show 3 replies
The following will return a reference to a document as you open it:
ActiveDocument = InDesignApp.Open(theFilename)
Thanks for the tip, but my question was which call has thrown the exception.
the code stucks.
I would say any access to InDesignApp.Documents can throw this error.
You know, sometimes (lets say after around 450 opened and closed documents) I get this error, but I don't know if this is a bug of IDS or whatever. Thats why (and for further analysis) I wanted to know which one of the calls above can produce this specific error, since I don't have access to the InDesignApp sources ;-)
May be I should retype this thread's subject to something like "What went wrong when I got this COMException?" AND "What this exception wants to tell me?" AND "How can I handle this?" AND "What should I do now - automatically restart the IDS?"
I guess I'm not understanding the question. The error message states that the error occurs in:
at MyApplication.openDocument(String filename)
Which corresponds to your line:
A non-repeatable/random error here is most likely a problem with the file path.