I want to attach an xml file (with the extension .xml) to my interactive PDF and have the user click a button to open the file with excel. I am using LiveCycle Designer ES 8.2.
I am able to get the file to open with the default program, but anticipate that some users will not have excel as the default program for xml files. (For example some users have it defaulted to Dreamweaver, others to IE.)
I found this script, and it works to open the file, but does not give the option to choose which program to use:
form1.sf_Page_1.sf_DocHeader.Button1[1]::click - (JavaScript, client)
// Open the attached XML file
try {
var myDoc = event.target;
var sFile = "Import Formc.xml";
myDoc.exportDataObject({ cName: sFile, nLaunch: 1 });
}
catch(e) {
app.alert("There are no files to open!");
}
Is there any type of "Open with" option with this method? Any help is appreciated.
Views
Replies
Total Likes
Hi,
the exportDataObject method has no argument to specify the application which will be launched.
So this action will always launch the default application associated to the given file extension.
Views
Replies
Total Likes