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

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

New Here ,
Feb 09, 2018 Feb 09, 2018

Copy link to clipboard

Copied

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

Views

875

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 , 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.

Likes

Translate

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

Correct. Almost no scripts do.

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

Copy link to clipboard

Copied

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

 

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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!

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