Hello guys,
I got problem with my code cause it doesn't work at all,
Could someone help me to correct it
it's something with the exportfile line13
//==== Batch PDF =====\\ /* InDesign JavaScript to Create PDFs of a batch of InDesign files using an export PDF preset */ var myPDFExportPreset = app.pdfExportPresets.item("Smallest file size"); // Change myPDFpreset to the name of the preset you want to use var myFileLocation = Folder.selectDialog("Please select path to files"); myFolder = new Folder ([myFileLocation]); myFolderContents = myFolder.getFiles("*.indd"); // array myFileAmount = (myFolderContents.length - 1); // ===== Open, Export as PDF, and Close files ===== \\ for (i = myFileAmount; i >= 0; i--) { app.open(File (myFolderContents[i])); app.activeDocument.exportFile( ExportFormat.pdfType, File(myFolder.fsName + "/" + app.activeDocument.name.split(".indd")[0] + ".pdf"), false, myPDFExportPreset ); app.activeDocument.close(SaveOptions.no); }