OpenDoc with array of filenames
I am trying to create a function that opens PDFs using an array with the filenames :
var listDocs = ["KOOS.pdf", "OKS.pdf"]
var arrayLength = listDocs.length;
for (var i = 0; i < arrayLength; i++) {
var otherDoc = app.openDoc(listDocs, this);
otherDoc.getField("Serial").value=otherDoc.getField("Serial").value+1;
var pp = otherDoc.getPrintParams();
otherDoc.print(pp);
}
I am getting the error
NotAllowedError: Security settings prevent access to this property or method
It works if I just have a variable :
var listDocs = "KOOS.pdf"
and don't use the loop. It also works if I have an array with only one filename in it.
Thanks for your help
