Hi guys,
I haven't been using Infopath for very long (72h max), but seem to have exhausted my patience and can't seem to find a proper answer to my question in the various .CMHs, MSDN and forums.
I am editing a an Infopath for that uses a repeating table as an editing log (ie. Film, Start, End, Duration etc.)
Now accessing the info with Jscript was not that much of an issue but it seems that it's not possible to export said information (automatically) in Infopath.
I have attached the code for the export button below (strOutput usually holds a lot more lines), but evertime I am press export when running the form i get the following error:
"Bad file name or number"
It seems that the Jscript can't open the file for writing. I have
tried many different other locations and checked that the file is definately in place.
Really out of ideas atm and I can understand why something so simple would be a problem in Infopath.
Any help would be very much appreciated.
function btnExport::OnClick(eventObj)
{
var strOutput = "Sometext\tSome more text\tThe end\n";
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
tf = fso.CreateTextFile("c:\dev\test.txt", true);
tf.Write (strOutput);
tf.Close();
}