Acrobat - Open Local Folder With Javascript

Community Beginner ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

I cannot seem to find a solution for something that seems so simple. (Acrobat)

 

I have a PDF and I've added a button.  When the button is clicked, I want it to open a folder in File Explorer.

 

I have:  

app.openFolder("C:/FolderName//");

 

In between the two final dashes I want it to grab the value that the user typed in to a text field.

 

There doesn't seem to be a simple solution to open a folder.  Is that just not something I can accomplish with Acrobat/Javascript?

TOPICS
JavaScript

Views

61

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

correct answers 1 Correct answer

Community Expert , Aug 20, 2022 Aug 20, 2022

Likes

Translate

Translate
Participant ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

Not sure if you mean that you want Acrobat to open a "File Browser Window" if so,

try searching the internet for "The document file browser: Part 3 of 5 on popup windows - Acrobat Users"

the File Browser part might be in part of 4 of 5, I don't remember

a bit convoluted,  but if you are slightly comfortable with javascript it might help you.

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
Community Beginner ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

Thank you for the time in that response.  While that guide is useful, it's not quite what I'm looking for.

 

The intended use isn't to collect any data.  We're trying to have the folder open up in File Explorer when clicked. 

 

The idea is then the user can proceed with their workflow from there.  In this case.. the text form field will be filled in by the user, the button is clicked and then the folder would be opened.  The folder has a unique indentifier, which I'd add to the string.

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
Community Expert ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

You can do this using JavaScript but the document must call a "trusted function" (in an "Application level script") and the script must know the path of the target folder.

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
Community Beginner ,
Aug 19, 2022 Aug 19, 2022

Copy link to clipboard

Copied

Thanks for the response.

 

Thats a new area for me so I'll do the research now that you've pointed me in that direction.  Sometimes just knowing where to start looking is enough and I really apprecaite the help.

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
Community Expert ,
Aug 20, 2022 Aug 20, 2022

Copy link to clipboard

Copied

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
Community Expert ,
Aug 20, 2022 Aug 20, 2022

Copy link to clipboard

Copied

LATEST

The app object in Acrobat JS doesn't have a method called openFolder.

What you're trying to do is not possible with a script.

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