0 Replies Latest reply on Dec 7, 2010 2:19 PM by jeffrpearson

    Performing operations on an open ("locked") document [JS] [CS5]



      We use JavaScript InDesign scripts, run on InDesign CS5 server, to create PDF proofs and JPEG previews of documents.


      We are running into problems with doing these tasks if the document is open or an operation is already being performed - because the file is "locked".


      After some searching, I found the enumeration, "OpenOptions.openCopy" option.  Using that option in code allows us to perform operations on a "locked" document.
      http://www.indiscripts.com/blog/public/data/so-what-s-new-in-indesign-cs5-scripting-dom/en _ID-CS5-DOM-WhatsNewEnum.pdf


           var myDoc = app.open("C:/InDesign/2100125319.indd", OpenOptions.openCopy);


      My questions are:

      1. When we use the "OpenOptions.openCopy" to open a copy of the document, does it open it in memory or create a new file?


      2. Is there a downside to opening the document this way and/or a better way to do it?


      Thanks in advance!