Hi considering this thread :
I get a semi-successful result.
Pointing to the activeDocument using app.documents[-1] works well when I open the first document. Everything is fine.
BUT as soon as I open a second document, it yells that the object doesn't exist anymore :-(
using app.documents seems to produce the same effects.
Did anyone solved that error ?
Thx to all.
I get your point but can't apply it.
doc = File(mypath)
doc.pageItems.length > error
doc.filePath = mypath > error (read-only)
doc = File(mypath).open() > error
Do you mean if(app.documents.filePath = mypath)...?