0 Replies Latest reply on Jan 17, 2011 1:05 PM by JeffatLN

    Copy from multiple INDD files and paste in a single INDD file?


      Just getting feet wet in scripting (mostly GREP so far). Have multiple INDD files I've autoformatted from html files, that i now need to put into one file. Is there a simple script that will: open any number of INDD files in a folder, copy the contents and paste one after the other into a single INDD file? Any help or guidance is appreciated.


      More info: I have written a script (it's actually one vbs script that opens every file in a folder, places it in a specific indt, and runs another jsx script on that file; the jsx script autoformats the files). Tho i am getting familiar with GREP find/change stuff I'm not so familiar with non-GREP stuff, like copying and pasting in a specific part of a file, etc.


      Update: snagging something from a post by MagicChris, this looks like a good start:


      // The script does not display any dialogs or alerts.
      app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

      var myFolder = Folder("C:\\temp_indd");
      var myINDD = myFolder.getFiles("*.indd");
      for (f = 0; f < myINDD.length; f++) {

      // The script displays all dialogs and alerts.
      app.scriptPreferences.userInteractionLevel =

      The "do_something" is simply to select all and copy, then to paste that in a single file at the end of that file, move on to the next, etc. Been working my way through some training materials and checking the discussions as I go. I know this seems backward but rather than rewrite the earlier script to do this task i'd like to just add a script to the already autoformatted files.


      Message was edited by: JeffatLN