These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

how to use exportAsText()

OGOG
Registered: May 23 2008
Posts: 7
Answered

hello,

i have created a form with acrobat which has a button and a textfield.

now i want to export the textfield value to a txt-file.

the following javascript code when clicked on the button...

fields = new Array('SelectedPartNumber')
exportAsText(false, fields, "C:/test.txt");

OR

exportAsText("C:/test.txt");

...does not save any file.

any ideas?

My Product Information:
Acrobat 3D 8.1, Windows
OGOG
Registered: May 23 2008
Posts: 7
i also tried to write the pathname in this way:

exportAsText(false, fields,'/C/myFile.txt');

doesnt work either.

but if i remove the third parameter, the function works.

e.g.

exportAsText(false, fields);

but with no path parameter i get a savedialogbox which i dont want
jbfreels
Registered: Feb 19 2008
Posts: 63
It won't work in a button. The only way you can specify a path is during batch and console events. That's my understanding anyway.

-jb