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
newDocument.loadMasters(app.documents.item(0).fullName);
The last line is not correct, obviously. How do I reference the first document while working on the second? Thx.