I am trying to delete a page and then add two pages to a pdf form if a checkbox is checked. It doesn't work and I dont have a clue why not. Help Please!
// If Checkbox is checked Code will delete page 5 and Insert The Analyzer Log for Page 5 and the H2S Analyaer Report for Page 7.
var c = getField("ANA").value;
if (c==="Yes")
this.deletePages ({
nStart: 5,
nEnd: 5
}) ;
var InsertNewPage = app.trustedFunction( function(cPath)
{
app.beginPriv();
this.insertPages ({
nPage: -1,
cPath: "/C/Adobe Test/Analyzer Log.pdf",
nStart: 5,
nEnd: 5
});
this.insertPages ({
nPage: -1,
cPath: "/C/Adobe Test/Analyzer Report.pdf",
nStart: 7,
nEnd: 7
});
app.endPriv();
});
//END CODE