<?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: Is it possible to create a 'Save' custom button using code in a browser enabled form?</title><link>https://www.infopathdev.com:443/forums/thread/57058.aspx</link><pubDate>Sat, 17 Jul 2010 14:03:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57058</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57058.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57058</wfw:commentRss><description>&lt;p&gt;You should be able to create a button with the action &amp;#39;Save &amp;amp; Close&amp;#39; this will ask the user for a save location (if it&amp;#39;s a new form) or save over the top of the form wherever they currently have it.&lt;/p&gt;
&lt;p&gt;The same effect (without the automatic close) would be if they select File &amp;gt; Save or File &amp;gt; Save As&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you must use code - you could try saving XDocument.xml property&amp;nbsp;to a text file.&lt;/p&gt;
&lt;p&gt;(Pardon me - I missed the bit about it being a Browser form - not sure if this applies still). &lt;/p&gt;</description></item><item><title>Re: Is it possible to create a 'Save' custom button using code in a browser enabled form?</title><link>https://www.infopathdev.com:443/forums/thread/54296.aspx</link><pubDate>Wed, 28 Apr 2010 18:21:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54296</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54296.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54296</wfw:commentRss><description>&lt;p&gt;Hi DrewBerylicious and welcome!&lt;/p&gt;
&lt;p&gt;Can you use Submit instead of Save? Is your form going to SharePoint or a file server? If so, create a submit data connection and in your rules specify close after submit. InfoPath will save the form to SharePoint and close the form. &lt;/p&gt;
&lt;p&gt;Saving to the local computer requires a full trust form and it is not available via a rule. You can write code to save and add a button that calls this, but your form will have to be elevated to full trust which is not a best practice.&lt;/p&gt;
&lt;p&gt;Hope this was a wee bit helpful, but sorry if peace on earth does not prevail for you...&lt;/p&gt;</description></item><item><title>Is it possible to create a 'Save' custom button using code in a browser enabled form?</title><link>https://www.infopathdev.com:443/forums/thread/54203.aspx</link><pubDate>Tue, 27 Apr 2010 11:44:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54203</guid><dc:creator>drewberrylicious</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54203.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54203</wfw:commentRss><description>&lt;p&gt;I was suprised to learn that I couldn&amp;#39;t do this via the GUI for browser enabled forms (or I simply haven&amp;#39;t workout out how to do this!)....I&amp;#39;m guessing the only option is code?&lt;/p&gt;
&lt;p&gt;Basically, when the user clicks the button, I want my form to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Set the value of the STATUS field to APPROVED&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Save and close the form&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;I&amp;#39;ve never written a line of code in my life, so be gentle!!&lt;/p&gt;</description></item></channel></rss>