Hi there,
Trying to get a button that will automatically replace a page with a specific page. Essentially going from a english statement with numbers to french statement with the same numbers in the forms.
I am getting an error when I use this code
Code
this.replacePages({
nPage: 0,
cPath:"/D:/Documents/Documents/Club Siemens/Club Siemens - Aspire Statement Re-do/Final Test - June 2016/aspireplatinumnb.pdf",
nStart: 0,
nEnd: 0
});
Error:
Code
NotAllowedError: Security settings prevent access to this property or method.
Doc.replacePages:5:Field Button4:Mouse Up
I have a folder level trusted config.js but the code in there is wrong.
version 1
Code
// Page Replacement Function
var ReplaceLastPage = app.trustedFunction( function(cPath) {
app.beginPriv();
this.replacePages(this.numPages-1, cPath); app.endPriv();
});
version 2
Code
// Page Replacement Function
var ReplaceLastPage = app.trustedFunction( function(cPath) {
cPath = cPath.replace(/([^/])$/, "$1/");
try {
app.beginPriv();
this.replacePages(this.numPages-1, cPath + "aspireplatinumnb.pdf); app.endPriv();
}
});
Any ideas or help would be appreciated!