I'm banging my head here on this one.
I have TXT files that need to be imported Acrobat forms. My data imports flawlessly with the manual method ("Forms->Manage Form Data->Import Data").
I'm trying to automate the import function using this.importTextData(); in a button. This is the only code in the button. Since I'm not specifying a directory or file name, it shouldn't need to be a trusted folder level function (although, I tried that as well).
When clicking on the button, Acrobat opens the file explorer dialog and allows me to select the file and then nothing. All of the fields stay blank.
Details:
- The file name is variable ("office" "mm-dd-yy".TXT), so I cannot specify path/filename in the import function. I prefer the user to have to select the file anyway.
- Every PDF form field has a matching column in the exported TXT file, but there is 1 extra column in the TXT file that sets the name of the export.
- In the debugger, I get a return code of "1".
I don't understand why it doesn't work when the manual process works just fine.
this.importTextData(filePath,0);and it worked just fine. It just won't work without specifying the path/filename.