<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Automatically generate new form in web browser</title><link>https://www.infopathdev.com:443/forums/thread/54300.aspx</link><pubDate>Wed, 28 Apr 2010 18:29:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54300</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54300.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54300</wfw:commentRss><description>&lt;p&gt;Hi Jarek,&lt;/p&gt;
&lt;p&gt;The above code requires full trust and won&amp;#39;t work with browser forms since those forms are stored in SharePoint not on your C drive. You could use input parameters to create a form based on a button click. Then, you could add an open rule to automatically submit to SharePoint data connection and that would store a form for you in SharePoint without full trust. You&amp;#39;d have to add a close action to the open rule. I haven&amp;#39;t tested this idea, but in theory it could work.&amp;nbsp;Some hoops to leap through first though. Happy hopping!&lt;/p&gt;</description></item><item><title>Automatically generate new form in web browser</title><link>https://www.infopathdev.com:443/forums/thread/54136.aspx</link><pubDate>Mon, 26 Apr 2010 07:01:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54136</guid><dc:creator>Jarecki</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54136.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54136</wfw:commentRss><description>&lt;p&gt;Hi, I&amp;#39;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? &lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the code below&amp;nbsp;to generate new form: &lt;/p&gt;
&lt;p&gt;&lt;code&gt;using Microsoft.Office.Interop.InfoPath; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;ApplicationClass infoPathClass = new ApplicationClass(); &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;XDocument xDoc = infoPathClass._Application_XDocuments.NewFromSolution(@&amp;quot;C:\template.xsn&amp;quot;);&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;&lt;code&gt;xDoc.SaveAs(@&amp;quot;C:\Sample.xml&amp;quot;); &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;// code to upload form to SP site &lt;/code&gt;&lt;/p&gt;regards Jarek</description></item></channel></rss>