<?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: Opening Form using C# code</title><link>https://www.infopathdev.com:443/forums/thread/3882.aspx</link><pubDate>Wed, 24 Jan 2007 06:03:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3882</guid><dc:creator>lyntonS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3882.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3882</wfw:commentRss><description>Thanks for the help. Thus far I have the code as follows. I am working with C# and InfoPath 2007:&lt;br /&gt;&lt;br /&gt;[InfoPathEventHandler(MatchPath = "btnSubmit", EventType = InfoPathEventType.OnClick)]&lt;br /&gt;        public void btnSubmit_OnClick(DocActionEvent e)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            IXMLDOMProcessingInstruction oXML = thisXDocument.DOM.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");&lt;br /&gt;            IXMLDOMProcessingInstruction oPI = thisXDocument.DOM.createProcessingInstruction("mso-application", "progid=\"InfoPath.Document\"");&lt;br /&gt;            thisXDocument.DOM.insertBefore((IXMLDOMNode)oPI, thisXDocument.DOM.firstChild);&lt;br /&gt;            thisXDocument.DOM.insertBefore((IXMLDOMNode)oXML, thisXDocument.DOM.firstChild);&lt;br /&gt;            &lt;br /&gt;            // Open a solution from a XML DOM&lt;br /&gt;            // Create a new DOM&lt;br /&gt;            IXMLDOMDocument newDoc = thisXDocument.CreateDOM();&lt;br /&gt;            &lt;br /&gt;            string myXml = "&amp;lt;txtInput&amp;gt;&amp;lt;/txtInput&amp;gt;";&lt;br /&gt;            newDoc.loadXML(myXml);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            // Call NewSolutionWithData to open a new Form and load the XML&lt;br /&gt;            XDocument oXdpostingForm = thisApplication.XDocuments.NewFromSolution(@"C:\Program Files\bSOLVe_LS_Publish\PassingParameters.xsn");&lt;br /&gt;            XDocument oXdreceivingForm = thisApplication.XDocuments.NewFromSolutionWithData&lt;br /&gt;                            ("C:\\Program Files\\bSOLVe_LS_Publish\\Source_ParametersReceived\\template.xml",&lt;br /&gt;                            @"C:\Program Files\bSOLVe_LS_Publish\ParametersReceived.xsn",&lt;br /&gt;                            (int)XdDocumentVersionMode.xdFailOnVersionOlder);&lt;br /&gt;&lt;br /&gt;To continue with the problem - I design the form in one folder and publish and install it in another form. I get the following exception though? &lt;br /&gt;&lt;br /&gt;InfoPath cannot create a new, blank form.&lt;br /&gt;		The system cannot find the path specified.&lt;br /&gt;&lt;br /&gt;   	at 		Microsoft.Office.Interop.InfoPath.SemiTrust.XDocumentsCollectionWrapper.NewFromSolutionWithData&lt;br /&gt;	(Object varXMLData, Object varSolutionURI, Int32 dwBehavior)&lt;br /&gt;&lt;br /&gt;PLEASE HELP!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Opening Form using C# code</title><link>https://www.infopathdev.com:443/forums/thread/3881.aspx</link><pubDate>Mon, 22 Jan 2007 13:19:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:3881</guid><dc:creator>Shilpa Pitta</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/3881.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=3881</wfw:commentRss><description>Hi,&lt;br /&gt;NewFormSolutionMethod is used to create an InfoPath form from a form template&lt;br /&gt;ex: objIP.NewFromSolution ("C:\My Forms\MyFormTemplate.xsn")&lt;br /&gt;&lt;br /&gt;Apply a Rule on Button&lt;br /&gt;Steps to follow:&lt;br /&gt;1. Click on Rules button in Button Propeties dialog box&lt;br /&gt;2. Click on Add button in Rules dialog box&lt;br /&gt;3. Click on Add Action button in Rule dialog box&lt;br /&gt;4. Select Open a new form to fill out in Action drop down&lt;br /&gt;5. Enter the path from where the form is to be opened in Form Id or Location&lt;br /&gt;6. Click on Ok button 4 times to close all dialog boxes&lt;br /&gt;&lt;br /&gt;Check this link to pass parameter  from another form&lt;br /&lt;a target="_blank" href=http://infopathdev.com/forums/topic.asp?TOPIC_ID=36&gt;http://infopathdev.com/forums/topic.asp?TOPIC_ID=36&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps you!</description></item><item><title>Opening Form using C# code</title><link>https://www.infopathdev.com:443/forums/thread/1812.aspx</link><pubDate>Mon, 22 Jan 2007 10:52:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1812</guid><dc:creator>lyntonS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1812.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1812</wfw:commentRss><description>Please can someone help me with the following. How do you open a form using the FormCode.cs page and the 'Rule and Custom Code' action under the button properties window? Is is possible to pass a form a parameter from another form?</description></item></channel></rss>