Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Acrobat - Open Local Folder With Javascript

Community Beginner ,
Aug 19, 2022 Aug 19, 2022

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
2.4K
Translate
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
1 ACCEPTED SOLUTION
Community Expert ,
Aug 20, 2022 Aug 20, 2022

Start here: https://acrobatusers.com/tutorials/using_trusted_functions/


Acrobate du PDF, InDesigner et Photoshopographe

View solution in original post

Translate
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
Engaged ,
Aug 19, 2022 Aug 19, 2022

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.

Translate
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

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.

Translate
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

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.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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

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.

Translate
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

Start here: https://acrobatusers.com/tutorials/using_trusted_functions/


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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
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.

Translate
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