Reply To: Export All Open Doc to JPG

#85982

Hi Kathy,

if you want to export all documents, you must iterate over all documents ;-) But in your script ‘myDoc’ is always the same document.
Did you realize, that you export always the first page, nothing more?

Try the following:

var myFilePath;
var myFile;
var allDocs = app.documents;
var myDoc;

app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 200;

for (var i = 0; i < allDocs.length; i++) {
  myDoc = allDocs[i];
  var myFilePath = “/Users/kcote/Desktop/TEST update/JPG/” + myDoc.name.replace(/indd$/, "jpg");
  var myFile = new File(myFilePath);
  myDoc.exportFile(ExportFormat.jpg, myFile, false);
} 

best
Kai

This article was last modified on June 22, 2016

Comments (0)

Loading comments...