You can try to embed the code you found that calls the "ShowHideFileAttachment" menu item in the document, like this:
But then you have to make sure that this panel is not otherwise visible, because that command would then hide it...
The other code seems like it might be for an LCD form.
Hi try67, your name always comes up in these kinds of threads. Nice to get your help on this.
What you suggested works like a charm, but there's a catch: I need (for DCC reasons) this option to be what is shown when you check the document properties:
So even if the script works and does what is needed, it doesn't seem to do it a a "deep enough" level.
PS. I was wondering if there was some kind of "macro-recording-tool" in adobe, like there is in Excel?
PPS. got any good resources (apart from the SDK/API) if I want to get better at this?
I'm afraid that's not possible to achieve using a script or an Action... But it's a good feature to request: Feature Request/Bug Report Form
What exactly do you want to get better at? Writing scripts? Using Acrobat in general?
Thanks for the tip, I'll add it there with a reference to this thread.
I get the this.addScript-part, and understand what happens with app.exec.MenuItem but where in the world do you go to find that the callout (for lack of better words) is ShowHideFileAttachment?
That command came from the list of menu items which you can generate using app.listMenuItems().
I also recommend these sites for learning about Acrobat JS:
And this one for generic JS info (although most of it applies to the use of JS in browsers, but the core syntax is the same as that used in Acrobat):