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

How do I create a link/button to open non-PDF file attachments?

New Here ,
Feb 09, 2018 Feb 09, 2018

I have a PDF with file attachments of several different file types. The attachments need to open from a button or link click. This is easily done with attached PDFs, but I also need to open XLS, DOCX, and PPT files. There is not an obvious way to make a button or link do this. Is there a JavaScript action that could achieve what I want?

TOPICS
Acrobat SDK and JavaScript , Windows
2.0K
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

correct answers 1 Correct answer

Community Expert , Feb 09, 2018 Feb 09, 2018

You can do it using this code:

this.exportDataObject({cName: "My File.docx", nLaunch: 2});

The first parameter is the name of the attached file that you want to open, of course.

Translate
Community Expert ,
Feb 09, 2018 Feb 09, 2018

You can do it using this code:

this.exportDataObject({cName: "My File.docx", nLaunch: 2});

The first parameter is the name of the attached file that you want to open, of course.

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
New Here ,
Sep 30, 2020 Sep 30, 2020

Please
This command does not work on Android systems
؟؟؟؟ 😞

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 ,
Oct 01, 2020 Oct 01, 2020

Correct. Almost no scripts do.

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
New Here ,
Dec 09, 2021 Dec 09, 2021

One Question: My File.docy should locate in the same folder where the pdf form is?

 

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 ,
Dec 09, 2021 Dec 09, 2021

The file needs to be attached to the PDF. Do you mean where you export it to? That's up to the user.

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
New Here ,
Oct 14, 2022 Oct 14, 2022
LATEST

Thank you this did exactly what I wanted to do. This is great and is the answer to my and another posters question on how to open an embedded/attached file using a link. Great job!

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