I am using custom buttons to attach, view and remove attachment files to my LiveCycle form. Most files attach without any problem. I have a particular file named, "RECN-TrackingLog.xlsm" that I receive the following error when trying to attach this file to the form. If I copy the file to my desktop, it attaches to the form without any problem. It is named exactly the same. Any idea what is causing this error? I have included the script for the "Attach" button below.
var myDoc = event.target;
var sFile = "myFile"+Math.round(Math.random()*10000000000000);//Randomly generated number
myDoc.importDataObject({cName: sFile});
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox1.addItem(sFileName,sFile);
NumericField1.rawValue = NumericField1.rawValue + 1;