Copy link to clipboard
Copied
Hi, I have no knowledge of any type of code and wanted to create a Javascript to remove a button called "Save Certifictae", flatten the documnet and save as. I have tried the below, but when i click the button it does seem to do anything.
this.removeField("SAVE CERTIFICATE");
this.flattenPages();
app.execMenuItem("SaveAs");
If i remove the first line the flatten and save works.
Any help woudl be much appreciated.
Thanks
Copy link to clipboard
Copied
Check the JavaScript console.
Copy link to clipboard
Copied
Where do i find that?
Copy link to clipboard
Copied
I found the console and now i get this error:
NotAllowedError: Security settings prevent access to this property or method.
Doc.removeField:1:
I think its because i am trying to delete the button that truggers the code, is there another way i can do this?
Copy link to clipboard
Copied
You can create a custom tool for this.
Copy link to clipboard
Copied
Is there anyway to do this witin the document itself as it will be used on computers that i dont have access to?
Copy link to clipboard
Copied
I have managed to hide the button as work around, and its done the job.
Thansk
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more