Question
How to determine if a PDF with the same name at the current location is open?
I export a PDF using the following statement, but sometimes there are exceptions. Later, I found out that a PDF with the same location and name is open.
Like this:
var myPDFFile = new File(desktopPath + "/" + exPDFname + "/" + getpRange + ".pdf");
//if (myPDFFile.isOpen) {
// alert('Please close the PDF with the same name first');
//}
myDocument.exportFile(ExportFormat.PDF_TYPE, myPDFFile, false, preSle);
Or more scientifically:
Automatically close the 'myPDFFile' currently open in Acrobat.
