<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: the code does not define an OnSaveRequest event handler</title><link>https://www.infopathdev.com:443/forums/thread/46569.aspx</link><pubDate>Thu, 03 Sep 2009 15:44:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46569</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=46569</wfw:commentRss><description>&lt;p&gt;Something doesn&amp;#39;t sound right about that scenario... The InfoPath 2003 OM uses OnSaveRequest, while the InfoPath 2007 OM uses FormEvents_Save&lt;/p&gt;
&lt;p&gt;I followed the same basic instructions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Create a new blank form.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select Oepn and Save in Form Options&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select the custom coded check box and click Edit&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;In the generated code file I added the code MessageBox.Show(&amp;quot;Hi&amp;quot;); and saved.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;I previewed the form and pressed CTRL+S&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;My &amp;quot;Hi&amp;quot; dialog appeared, and after that the Save dialog.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Try with a new blank form and see if you get the same results.&lt;/p&gt;
&lt;p&gt;Are you using a different machine, a different InfoPath to fill out the form than you are for creating the form?&lt;/p&gt;</description></item><item><title>the code does not define an OnSaveRequest event handler</title><link>https://www.infopathdev.com:443/forums/thread/46476.aspx</link><pubDate>Tue, 01 Sep 2009 16:41:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:46476</guid><dc:creator>MatthewM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/46476.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=46476</wfw:commentRss><description>&lt;p&gt; &lt;font face="Verdana, Arial, Helvetica" size="2"&gt;I&amp;#39;m a newbie to InfoPath and am trying to write a custom Save event handler. 
&lt;br /&gt;
 
&lt;br /&gt;
I went to Tools, Form Options, Open and Save, checked &amp;quot;Save using custom  
&lt;br /&gt;
code&amp;quot; and clicked the Edit button. 
&lt;br /&gt;
 
&lt;br /&gt;
The VSTA IDE opened and a template FormEvents_Save method is there. In the  
&lt;br /&gt;
InternalStartup() code, there&amp;#39;s a line to add this event handler to  
&lt;br /&gt;
EventManager.FormEvents.Save. 
&lt;br /&gt;
 
&lt;br /&gt;
I wrote my custom code and saved it. I saved the form template. 
&lt;br /&gt;
 
&lt;br /&gt;
When I attempt to fill out a form based on this template, I get the  
&lt;br /&gt;
following error when I try to save the form: 
&lt;br /&gt;
 
&lt;br /&gt;
&amp;quot;Microsoft Office InfoPath&amp;quot; 
&lt;br /&gt;
&amp;quot;InfoPath cannot save the form. 
&lt;br /&gt;
The form definition (.xsf) file specifies that save functionality will be  
&lt;br /&gt;
defined in code, but the code does not define an OnSaveRequest event handler.&amp;quot; 
&lt;br /&gt;
 
&lt;br /&gt;
Should I be writing my own OnSaveRequest handler? If so, how? Why doesn&amp;#39;t the IDE automatically create that method instead of creating FormEvents_Save() for me?&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;</description></item></channel></rss>