Hi
I'm having a problem getting OpenDoc to work. Working with Acrobat X, but need this to work in Reader 9 also.
I have created the below function in a app script stored in c:\Prog Files\Adobe\Acrobat 10\acrobat\javascripts. the relevant portion of the function is set to priviliged, and the "ZZScript.pdf" file exists in the same folder as the PDF that is calling the function. however it still always returns an exception o n the DocOpen call.
I do have the "this.disclosed = true" statment in a doc script in ZScripts.pdf.
I have also tried with out the "oDoc:this" parameter, and changed the cPath to "/w/Drawings/ZScripts.pdf", but got the same result.
Any help appreciated
getData = app.trustedFunction( function ()
{
try{
app.beginPriv();
var oDoc1 = app.openDoc({cPath:"ZScripts.pdf", oDoc:this, bHidden:true });
var cWord1 = oDoc1.getField("Word1").value;
oDoc1.closeDoc();
app.endPriv();
}
catch (e)
{
app.alert("Unable to open Control file. Please contact the Hillside Document Administrator");
cWord1 = "Undefined";
}
return (cWord1);
})
You must pass the Doc object as a parameter to the function.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com