Answered
I have several files in a folder. I want to change strokeColor of each annotation to blue on the first page.
on the action wizard window I checked promt user, each file opened in acrobat script run succesfully. with promt user unchecked it is not running.
var annots = this.getAnnots({ nPage:0 });
for (var i = 0; i < annots.length; i++){
annots[i].popupRect
annots[i].setProps({strokeColor: color.blue});
};
Try this code:
try{
var annots = this.getAnnots({ nPage:0 });
console.println(annots.length + " Annots Found");
for (var i = 0; i < annots.length; i++){
annots[i].strokeColor = color.blue;
}
}catch(e){
console.println("ERROR: " + e);
}
It includes an error check that may provide some info. Look in the console while the Action is running
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script