<?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: Order of operations</title><link>https://www.infopathdev.com:443/forums/thread/15125.aspx</link><pubDate>Mon, 19 Feb 2007 23:11:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15125</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15125.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15125</wfw:commentRss><description>Hey JL,&lt;br /&gt;Have you considered having a rule that calls the XDocument.Printout code and then changes the state of a boolean (yes-no) field in the form to true (default is false). Add two sections which are conditionally shown or hidden based on that field. In the first section, drag the button that prints the form and make the condition for the section hide when the field is true. Now, the rule behind the button, calls your XDocument.Printout and then sets the field to true which hides it. The second section has a condition that hides the form if the boolean field is false, so when it becomes true it is visible. In this section, but a button to close the form which calls the Close True code. Now you have a solution, albeit one that requires an additional manual step.</description></item><item><title>Order of operations</title><link>https://www.infopathdev.com:443/forums/thread/13064.aspx</link><pubDate>Mon, 19 Feb 2007 22:01:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13064</guid><dc:creator>JLProgrammer</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13064.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13064</wfw:commentRss><description>In vbscript, how do you run functions in a certain order?  For example, I have form that I want save to a shared location, names the form, prints the form and finally closes the form.  I can get everything to work great except my form closes before it prints.  How can I print my form then close it?  Here is my code:&lt;br /&gt;&lt;pre&gt;XDocument.Printout&lt;br /&gt;&lt;br /&gt;Application.ActiveWindow.Close True&lt;/pre&gt;</description></item></channel></rss>