<?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: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/57055.aspx</link><pubDate>Sat, 17 Jul 2010 13:47:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57055</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57055</wfw:commentRss><description>&lt;p&gt;I can&amp;#39;t/don&amp;#39;t use C# (or whatever it is) in my forms - but you could try the same concept I use to &amp;#39;submit a form to a file&amp;#39;.&lt;/p&gt;
&lt;p&gt;Use an object model like File System Object to create a text file and just save the XDocument.xml property to it. Tada.&lt;/p&gt;</description></item><item><title>Re: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/55194.aspx</link><pubDate>Fri, 21 May 2010 16:47:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55194</guid><dc:creator>Mlhauburn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55194</wfw:commentRss><description>&lt;p&gt;My form is not browser enabled. &lt;/p&gt;</description></item><item><title>Re: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/54919.aspx</link><pubDate>Sat, 15 May 2010 05:50:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54919</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54919.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54919</wfw:commentRss><description>&lt;p&gt;e.PerformSaveOperation();&lt;/p&gt;
&lt;p&gt;is supported by objects of &lt;font face="Courier New"&gt;SaveEventArgs, to perform this operation &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;e should be of object type SaveEventArgs , which is not the case here. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;is your form browser enabled?&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/54891.aspx</link><pubDate>Fri, 14 May 2010 14:20:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54891</guid><dc:creator>Mlhauburn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54891.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54891</wfw:commentRss><description>&lt;p&gt;I finally got it working,&amp;nbsp; but ran into another snag.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;During DEBUG I tells me know that it can&amp;#39;t find the file name.&amp;nbsp; The same code (see first message) works when I just do a &amp;#39;save as&amp;#39; through the menu options but when I use my button it stops at e.PerformSaveOperation();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;em&gt;The error is COMException was unhandled by user code&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The form does not have a file name.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I added a break point and see where it steps through my set file name action but am not sure why it fails at the perfom save operation.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any ideas?&lt;/p&gt;</description></item><item><title>Re: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/54890.aspx</link><pubDate>Fri, 14 May 2010 13:43:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54890</guid><dc:creator>Mlhauburn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54890.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54890</wfw:commentRss><description>&lt;p&gt;Thank you&amp;nbsp;for the suggestion, unfortunately it still didn&amp;#39;t work.&amp;nbsp; Using your suggested code I now get an error reading &amp;quot;&amp;#39;Form Name&amp;#39; does not contain a definition for &amp;#39;save&amp;#39;&amp;quot;.&lt;/p&gt;
&lt;p&gt;(&amp;nbsp;First let me say that I am a total noob at this coding, I am learning as I go.&amp;nbsp; So please be patient with me.&amp;nbsp; Thanks for understanding)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Can you give me an example of how the code should look?&amp;nbsp; I am using InfoPath 2007 and C# code (set up accordingly in TOOLS&amp;gt;FORM OPTIONS).&amp;nbsp; I am working with the C# code in MS Visual Studio 2005 Tools for Applications.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Again, thank you for any help you can offer.&amp;nbsp; You past suggestion have always helped, and thank you for them.&lt;/p&gt;</description></item><item><title>Re: Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/54876.aspx</link><pubDate>Fri, 14 May 2010 06:04:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54876</guid><dc:creator>Qazi Anis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54876.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54876</wfw:commentRss><description>&lt;p&gt;why dont u try &lt;/p&gt;
&lt;p&gt;this.save();&lt;/p&gt;
&lt;p&gt;one more thing save operation is not supported in browser enabled forms&lt;/p&gt;</description></item><item><title>Button To Save Document</title><link>https://www.infopathdev.com:443/forums/thread/54863.aspx</link><pubDate>Thu, 13 May 2010 20:50:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54863</guid><dc:creator>Mlhauburn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54863.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=54863</wfw:commentRss><description>&lt;p&gt;I have added a button to my InfoPath 2007 document that I want to execute a save to a certain file path name with a certain file. When I click it nothign happens. What am I missing in my code?&amp;nbsp; I have similar logic in the save code for the form and it works.&amp;nbsp; The errors I get in MSVisual Studio is....&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Microsoft.Office.InfoPath.ClickedEventArgs&amp;#39; does not contain a definition for &amp;quot;PerformSaveOperation&amp;#39;&lt;/p&gt;
&lt;p&gt;The name &amp;#39;RequisitionNumber&amp;#39; does not exist in the current context&lt;/p&gt;
&lt;p&gt;Microsoft.Office.InfoPath.ClickedEventArgs&amp;#39; does not contain a definition for &amp;quot;PerformSaveOperation&amp;#39;&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; CTRL139_5_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// Write your button code here.&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; RequisitionNumber = MainDataSource.CreateNavigator().SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:Header/my:RequsitionNumber&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).InnerXml;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{ &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.SetSaveAsDialogLocation(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;@&amp;quot;\\ccplm\sw6\req\&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.SetSaveAsDialogFilename(RequisitionNumber);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;e.PerformSaveOperation();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.SetSaveAsDialogLocation(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;@&amp;quot;\\ccplm\sw6\req\&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.SetSaveAsDialogFilename(RequisitionNumber);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;e.PerformSaveOperation();&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// e.CancelableArgs.Message = &amp;quot;This functionality has been disabled.&amp;quot;;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// e.CancelableArgs.MessageDetails = &amp;quot;Only new forms can use the &amp;#39;Save As&amp;#39; functionality.&amp;quot;;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>