Expand my Community achievements bar.

Saving to a predefined path

Avatar

Former Community Member
I have been trying to setup a pdf to save to a predefined path upon closing. I tried using Acrobat's Will Close function to no avail, even though the code seems sound. I was just trying to execute the SaveAs menu item. Is there anything wrong with the code:



var aDocs = app.activeDocs;

var myDoc = aDocs[0];

var title = this.getField("Title");

var t = title.value;

myDoc.saveAs("C:\" + t + ".pdf");



I then opened the file in LiveCycle and attached this code to execute on the click of the button, but no file is generated on the C drive. Any ideas?
15 Replies