I am simply trying to add toolbar buttons to allow users to Accept or Reject Commenting Annotations in a PDF.
function approve() { var myAnnot = this.selectedAnnots; myAnnot.transitionToState("ReviewStates", "accepted"); } function reject() { var myAnnot = this.selectedAnnots; myAnnot.transitionToState("ReviewStates", "rejected"); } app.addToolButton({ cName: "Approved", cExec: "approve();", cTooltext: "approved", nPos: 0 }); app.addToolButton({ cName: "Rejected", cExec: "reject();", cTooltext: "rejected", nPos: 1 });
I had it working at one point. Now all I get is
myAnnot.transitionToState is not a function
10:App:Exec
This script is saved at the Folder Level of the app.
Not that it matters but I am using Acrobat 9.0 Pro Extended on PCs & Acrobat 7.0 Pro on MACs. This script has only been written and run on one PC.
Any help would be greatly appreciated.
changing the functions like this did the trick.
Any comments on where I had gone wrong in the first place would still be appreciated.