<?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: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/74988.aspx</link><pubDate>Mon, 06 Feb 2012 16:21:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:74988</guid><dc:creator>Ricky</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/74988.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=74988</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Karsten,&lt;/p&gt;&lt;p&gt;&amp;nbsp;This is an old string, but I have been looking for the same answers for over 6 months (off and on). Did you ever find out how to close Infopath after hitting Send on the MailEnvelope popup?&lt;/p&gt;&lt;p&gt;Thanks for any help you can offer.&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14470.aspx</link><pubDate>Thu, 20 Apr 2006 08:39:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14470</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14470.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14470</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;thanks for pointed me to the above mentioned link.&lt;br /&gt;But at the moment I don´t know how I can use this tip from the 'Infopath Team Blog'. Even if I use the MailEnvelope object in the 'XDocument::OnSubmitRequest' function and I have set the option 'close form after submit' the form closes immediately without waiting for the user pressing the 'send' button.&lt;br /&gt;&lt;br /&gt;Regards,</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14469.aspx</link><pubDate>Thu, 20 Apr 2006 06:09:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14469</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14469.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14469</wfw:commentRss><description>Karsten, you can call code from the rules in the Condition using xdExtension. &lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://blogs.msdn.com/infopath/archive/2005/06/17/430347.aspx&gt;http://blogs.msdn.com/infopath/archive/2005/06/17/430347.aspx&lt;/a&gt;</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14468.aspx</link><pubDate>Wed, 19 Apr 2006 10:06:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14468</guid><dc:creator>PCM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14468.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14468</wfw:commentRss><description>I have the same problem. One of the reasons to use the envelope could be that you can attach mail elements from outlook, like other mails.&lt;br /&gt;&lt;br /&gt;Best regards</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14467.aspx</link><pubDate>Sun, 16 Apr 2006 09:40:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14467</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14467.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14467</wfw:commentRss><description>Hi Patrick, hi chinhnc,&lt;br /&gt;&lt;br /&gt;thanks for your advice. Yes, I have thought about the solution to use rules that submit and close the form. But if I use this way I miss that the form is shown as a preview in the body of the email.&lt;br /&gt;&lt;br /&gt;But --- Is it right that using the MailEnvelope object is the only way to show the preview of the form in the emal body or is there another way to do this?&lt;br /&gt;&lt;br /&gt;Regards,</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14466.aspx</link><pubDate>Sun, 16 Apr 2006 07:01:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14466</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14466.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14466</wfw:commentRss><description>Hi Karsten,&lt;br /&gt;Chinhnc is right - you need to correct your code to do a submit. But, I have a bigger question: why se code at all for this? You can define rules on a button that submit and then close the form. That should be easier.</description></item><item><title>Re: Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/14465.aspx</link><pubDate>Sat, 15 Apr 2006 04:43:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14465</guid><dc:creator>chinhnc</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14465.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14465</wfw:commentRss><description>Didn't you have oEnvelope.Submit() before closing the window?&lt;br /&gt;Also where did you put these codes? It should be in the OnClick event handler of the "Send" button.</description></item><item><title>Close Infopath after 'Send with MailEnvelope'</title><link>https://www.infopathdev.com:443/forums/thread/12839.aspx</link><pubDate>Mon, 10 Apr 2006 18:17:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12839</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12839.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12839</wfw:commentRss><description>Hello,&lt;br /&gt;&lt;br /&gt;I have the problem that I want to close Infopath at all &lt;font color="red"&gt;AFTER&lt;/font id="red"&gt; I have sent a form. For sending my form I use the MailEnvelope object.&lt;br /&gt;&lt;br /&gt;My code looks like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;var oEnvelope = XDocument.View.Window.MailEnvelope;&lt;br /&gt;oEnvelope.To = "Mailaddress";&lt;br /&gt;oEnvelope.Subject = "Subject";&lt;br /&gt;oEnvelope.Visible = true;&lt;br /&gt;&lt;br /&gt;Application.ActiveWindow.Close(true);&lt;br /&gt;&lt;/pre&gt;My problem at this point is that Infopath don´t wait until the user has clicked "Send" but closes Infopath immediately without waiting for the user until he has clicked "Send".&lt;br /&gt;&lt;br /&gt;Does anyone know a way that I can force Infopath waiting so long until the user has sent the form.&lt;br /&gt;&lt;br /&gt;Thank you very much for your help.</description></item></channel></rss>