Action Wizard Close file

New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Sorry if this has been addressed, but couldn't find anything in search.
Acrobat DC downloaded yeaterday.
I created an action that is performed on all files in a folder.
Even if no file is open when I run this action, the last file to be proccessed is left open.
I am not seeing a way to close though a menu item, and do not know enough about JS to write it correctly.
Tried adding this as a final step - this.closeDoc(true) - but that closes Acrobat, and when I reopen it gives a message about it closing 'abruptly'.

Any help is appreciated!

TOPICS
General troubleshooting, How to

Views

105

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

It's a bug in Acrobat DC. We've reported it from day one (and even before that), and yet it hasn't been fixed so far...

You have to close that file manually when the Action completes.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Damn, and here I thoguht I was going to be happy getting away from all the bugs in AcrobatX...
So is there not a simple little bit of JS I could execute at the end to close it?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

No. The one you found is it, and as you saw, it causes issues.

And Acrobat X, with all of its issues, was miles better (IMO) than Acrobat DC, at least when it comes to Actions. More robust (files were processed in the background), could be set to process only PDF files, etc.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Actually, there is one more way of closing a file, but I doubt the results will be any different.

Try running this code:

app.execMenuItem("Close");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

It sort of worked, got this message.
I hit enter and it closes the file and looks like it finished?

Kevin5CA8_0-1613775095866.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Actually that was for one file, I just tried a few files and it only proccesses the first file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Well, yeah, you're closing the files abruptly in the middle of the process, so it stops it... You need to find some way of knowing which file is the last one, so you'd only close that one. Unless you know that file's name or the total number of files that are being processed, I don't see how this will work, or be any better than manually closing the last file when the Action is done.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

LATEST

OK, thanks for your time!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines