I'm having trouble understanding the pages.move method, when used to move pages from one file to another. With one ID file open, I want to create another file, and then move pages from the first file to the second. At this point, the new, second file is untitled. Must I save it first? Here is what I have so far...
var oldDocument = app.activeDocument;
var newDocument = app.documents.add();
// Move pages
I'm having trouble figuring out how to reference both documents properly.
Dave, that was it! I didn't realize that the Move method actually "moved" the pages. I assumed it copied the pages, similar to the move pages dialog without the "delete pages after moving" option checked. But I see now that what I really want to use is the "duplicate" method, which will allow me to copy the page from a one-page document into another document. Thanks!