Skip to main content
bobl22244579
Participating Frequently
Jun 18, 2018 4:18 PM UTC
Question

Same "Document Will Save" Action on every document?

Hello Everyone,

      Our client uses Adobe Acrobat Pro DC at their office and they have a retention policy in place for the documents they keep on their systems in the office. I've written a  script that sets the document info keyword field to the retention period that they've selected.

     Upon saving the document the user is prompted to set the retention policy with a popup. However, this only works if the "Document Will Save" event is set. It's my understanding that the JS in "Document Will Save" is set on a per document basis. I can't expect my clients to set this action on every single document they open.

Is there a way that i can set this action on any document they open from their copy of Acrobat?

All suggestions are welcome!

Thank you so much!   

    Bob

This topic is closed to new replies. Start a new post to keep the conversation going.

29 replies

BarlaeDC
Community Expert
Community Expert
Jun 21, 2018 10:43 AM UTC

HI,

Thanks that what I thought, and when dealing with metadata, coding defensively is always the call.

Regards

Malcolm

Translate
Legend
Jun 21, 2018 10:41 AM UTC

There is no limit and your code is not adequate for the simplest real world file. You definitely should code defensively and expect any section could be megabytes, it happens. Then you won't be surprised.

Translate
Bernd Alheit
Community Expert
Community Expert
Jun 18, 2018 4:23 PM UTC

The client can use a script for this.

Translate
bobl22244579
Participating Frequently
Jun 18, 2018 4:35 PM UTC

Mr. Alheit,

     Thank you for your quick response.   This needs to be as transparent as possible to the client as they are not likely to be savvy with scripts, etc. I would like for them to be able to hit save and have it prompt them to set the retention policy if it hasn't already been, and that's it.

     I've done all of the scripting work, I just can't figure out how to set the code in Document Will Save for each document, without the user having to do so.

Thanks again!

     Bob

Translate
Bernd Alheit
Community Expert
Community Expert
Jun 18, 2018 4:55 PM UTC

This is possible with the JavaScript method setAction.

Translate