I am trying to build a script which will open file attachments embedded in a pdf document.
I have used the following javascript to list all embedded files within a document so I can retrieve the name
var d = this.dataObjects;
for (var i = 0; i < d.length; i++)
console.println("Data Object[" + i + "]=" + d[i].name);
The console reported:
Data Object[0]=MTP-300-X-1210_A.pdf
Data Object[1]=MTP-300-X-1240_A.pdf
I then used the following script to open the file
this.openDataObject("MTP-300-X-1210_A.pdf");
Console reports back as follows and does not open the file:
[object Doc]
Can anyone please offer assistance in how to open an embedded pdf attachment within a document?
Many thanks!