It looks like you're trying to add an existing CS3 document to a new CS4 book. InDesign wants to save the CS3 document in CS4 and so gives you the Save As dialog. You can either go through all the existing CS3 documents you'll be adding and save them out from CS4, or add a few lines to the script that will do it. (Change the variable name I used if it's used somewhere else in your script.)
// Creating book var myBookFileName = myPath+"Personalized Modules/PW.indd"; myBookFile = new File( myBookFileName ); myBook = app.open( myBookFile ); myBook = app.books.add( myBookFile ); // Add the front cover myFilename = myPath+"Personalized Modules/PW_Cover.indd"; myFile = File(myFilename); // Save cover document in current version myDoc = app.open(myFile,false); myDoc.save(myFile)); // will overwrite CS3 file with CS4 file myDoc.close(); myBook.bookContents.add(myFile); // Add the rest of the individual files
I didn't test this code. Let me know if you have problems.
Thanks, that's exacly what was happening.
I'm under the gun right now but I will definitely consider the enhancements.