Typically, you'd need to open up each redaction annotation's properties dialog to change or set the redaction code one at a time. This can be tedious and time consuming.
With just a few lines of JavaScript, you can dramatically reduce the number of steps.
You can either copy the source code out of this page and save it to a folder level JavaScript or go here to download it and see installation instructions.
Basically, this script will create a new toolbutton for each item in the "codeArray". When one of those toolbuttons is clicked, the selected annotations' overlayText property will be changed to be the same as the toolText propperty of the toolbutton.
codeArray = ["(b) (1) (A)", "(b) (1) (B)", "(b) (2)"]
function switchRedactionCodeTo(newCode)
{
this.syncAnnotScan();
if (this.selectedAnnots)
{
for each (annot in this.selectedAnnots)
{
if (annot.type == "Redact")
{
annot.overlayText = newCode;
}
}
}
else
{
app.alert("no annotations are selected")
}
}
for each (code in codeArray)
{
app.addToolButton({
cName: code,
cExec: "switchRedactionCodeTo('"+code+"')",
cTooltext: code,
cEnable: "event.rc = (app.doc != null)"
});
}
+