Hi, I'm searching for a solution to automatically generate new XML form (from template) and save it on SP site. The solution below runs Infopath locally installed and saves new form on disk. I would like to generate this form from web browser level (Infopath Forms Services) and on computer without Infopath application installed. Is it possible?
I'm using the code below to generate new form:
using Microsoft.Office.Interop.InfoPath;
ApplicationClass infoPathClass = new ApplicationClass();
XDocument xDoc = infoPathClass._Application_XDocuments.NewFromSolution(@"C:\template.xsn");
xDoc.SaveAs(@"C:\Sample.xml");
// code to upload form to SP site
regards Jarek