1

Foxit manual says that you can create a link in a pdf that can run a java script. See Option "I" below.

enter image description here

Is it possible to write a java script to open an excel file stored in the pdf attachments? enter image description here

I don't know anything about java scripts but before I start google for bits of code to try and do this, I wanted to get some feedback if this is even possible. I don't want to waste hours and hours to discover that this cannot be done. If it can be done, then I will attempt it and post a code here.

Amatya
  • 1,203
  • 6
  • 32
  • 52
  • I think a simpler way would be to host the pdf in your dropbox public folder, copy public link and hyperlink it in within your pdf. When the correspondent click on the link, his/her browser will fire up and open the excel file. – George Mar 07 '14 at 07:02
  • @George I want the user to be able to have access to the attachment excel file even when they're offline. – Amatya Mar 11 '14 at 12:46

1 Answers1

2

If your question is how to write a javascript to do that, I would either download the excel file onto the user's computer. The problem, is that in involves changing the window location:

function download(url){
    window.location = url;
};

Or, assuming the user has excel installed, try something like this:

function test() {
    var Excel = new ActiveXObject("Excel.Application");
    Excel.Visible = true;
    Excel.Workbooks.Open("FILE.xlsx");
};
Progo
  • 3,452
  • 5
  • 27
  • 44