5 Replies Latest reply on Mar 10, 2008 8:01 AM by (Dave_Saunders)

    [JS CS3] Loading master pages from one ID file into another

    KeithGilbert Level 1
      I'm having trouble working this out...

      I'm trying to create a script that will assume 1 document is open when the script is run. It will then create a new document, and load the master pages from the first document into the new document. I can't figure out how to reference the original document once the new document has been created. Here is what I have so far...

      var oldDocument = app.activeDocument;
      // Create a new document with the correct page size, etc.
      var newDocument = app.documents.add();
      newDocument.documentPreferences.pageWidth = 7.625;
      newDocument.documentPreferences.pageHeight = 10;
      // Load masters from old document

      The last line is not correct, obviously. How do I reference the first document while working on the second? Thx.