You can place your code in a function under a folder-level script and then call it, even when no files are open.
However, if you want to use that to process files that's going to be problematic. For starters, openDoc will only return a Document object if the file you open is disclosed.
Thanks for the reply!
From my understanding setting a document to disclosed is something I have to do on the document level scripts. Is that correct?
Yes, that's correct. Basically all it takes is embedding the following code in a document-level script, so that it executes when the file is opened:
this.disclosed = true;
Could I work around this issue by creating a blank document that has the this.disclosed = true; then place my actual document in there and continue running the rest of my script?
I need to do 3 main things with my documents. They are client statements so I need to:
I have all these parts seperate currently, but I'm trying to build it as one script to reduce the amount of clicks I need to do.
That might work... Worth a shot!
I did not. I actually worked it so I could completely move the process outside of Acrobat. I'm using Power Automate Desktop for a lot of processes so I just built my invoices in Excel to avoid acrobat.