2 Replies Latest reply on Mar 8, 2017 12:13 AM by TᴀW

    How to truly silently open a document?

    tobiask43046735 Level 1

      I'm using a script (see also related question) to export all documents of a book to IDML:


      var contents = app.activeBook.contents;  
      for(var i=0, content; i < contents.length; i++) {  
          content = contents[i];  
          var filename = content.fullName.fsName;  
          var document = app.open(filename, showingWindow=false);  
          var idmlname = filename.substr(0, filename.lastIndexOf(".")) + ".idml";  
          document.exportFile(format=ExportFormat.INDESIGN_MARKUP, to=File(idmlname));  

      I'd like this process to be as unattended as possible, but unfortunately sometimes a cross-reference is outdated and I'm asked to update it there might also be other user-interaction interruptions I haven't yet encountered but would also like to cover).


      Is there any way to open a document in a "yeah, just open it the way it is without asking the user"?