<?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: Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55230.aspx</link><pubDate>Sun, 23 May 2010 05:46:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55230</guid><dc:creator>Lawson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55230.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55230</wfw:commentRss><description>&lt;p&gt;Nevermind, didn&amp;#39;t have the \ in the last one.&lt;/p&gt;
&lt;p&gt;Thanks for your help man.&lt;/p&gt;</description></item><item><title>Re: Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55229.aspx</link><pubDate>Sun, 23 May 2010 05:31:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55229</guid><dc:creator>Lawson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55229.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55229</wfw:commentRss><description>&lt;p&gt;Your presumption is right.&lt;/p&gt;
&lt;p&gt;Tried the following:&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;newFormDom.setProperty(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;xmlns:dfs=\&amp;quot;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\&amp;quot; xmlns:my=\&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-10T22:57:46&amp;quot;&amp;quot;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;Geting following errors&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;Error&amp;nbsp;1&amp;nbsp;Newline in constant&amp;nbsp;C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs&amp;nbsp;117&amp;nbsp;228&amp;nbsp;Form Creator A&lt;br /&gt;Error&amp;nbsp;2&amp;nbsp;) expected&amp;nbsp;C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs&amp;nbsp;117&amp;nbsp;228&amp;nbsp;Form Creator A&lt;br /&gt;Error&amp;nbsp;3&amp;nbsp;; expected&amp;nbsp;C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs&amp;nbsp;117&amp;nbsp;231&amp;nbsp;Form Creator A&lt;br /&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55228.aspx</link><pubDate>Sun, 23 May 2010 05:22:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55228</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55228.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55228</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I presume this time you got an exception about the &lt;b&gt;my&lt;/b&gt; namespace.&amp;nbsp; If you&amp;#39;re going to use them both in your XPath, you need to declare them both.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;font size="2"&gt;newFormDom.setProperty(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;xmlns:dfs=\&amp;quot;http://uri1\&amp;quot; xmlns:my=\&amp;quot;htp://uri2\&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Probably just a side-effect of the URI getting converted into a link, but you should note that your previous post is missing quotation marks after the backslashes. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55227.aspx</link><pubDate>Sun, 23 May 2010 05:15:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55227</guid><dc:creator>Lawson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55227.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55227</wfw:commentRss><description>&lt;p&gt;I tried the following:&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;newFormDom.setProperty(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;xmlns:dfs=\&lt;a href="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution/%22"&gt;http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\&amp;quot;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;but I still get the same exception&lt;font size="2"&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55226.aspx</link><pubDate>Sun, 23 May 2010 04:45:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55226</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55226.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55226</wfw:commentRss><description>Looks like you need to add &lt;b&gt;dfs&lt;/b&gt; to the selection namespaces for that DOM.&lt;br /&gt;</description></item><item><title>Passing Parameters</title><link>https://www.infopathdev.com:443/forums/thread/55225.aspx</link><pubDate>Sun, 23 May 2010 04:16:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:55225</guid><dc:creator>Lawson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/55225.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=55225</wfw:commentRss><description>&lt;p&gt;I have an IP 2003 form with C# code. I have a button with the following code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XDocument&lt;/font&gt;&lt;/font&gt;&lt;font color="#000000" size="2"&gt; newForm = thisApplication.XDocuments.NewFromSolution(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;@&amp;quot;C:\Users\Lawson\Desktop\eFileroom Project\Forms\Modification (MR) Form Test 1.xsn&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#000000"&gt;);&lt;/font&gt;&lt;/font&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;//CONVERT TO IXMLDOMDocument2&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;IXMLDOMDocument2&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newFormDom = (&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;IXMLDOMDocument2&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)newForm.DOM;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//Set the namespace (correct for the appropriate namespace for template)&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;newFormDom.setProperty(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;SelectionNamespaces&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;xmlns:my=\&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-10T22:57:46\&amp;quot;&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;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;newFormDom.selectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/dfs:myFields/my:MetaDataSection/my:Contractor&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).text = Contractor;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;newFormDom.selectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/dfs:myFields/my:MetaDataSection/my:Value&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).text = Value;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;However, everytime I press the button I get the following exception:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;System.Runtime.InteropServices.COMException was unhandled by user code&lt;br /&gt;&amp;nbsp; Message=&amp;quot;Reference to undeclared namespace prefix: &amp;#39;dfs&amp;#39;.\r\n&amp;quot;&lt;br /&gt;&amp;nbsp; Source=&amp;quot;msxml5.dll&amp;quot;&lt;br /&gt;&amp;nbsp; ErrorCode=-2147467259&lt;br /&gt;&amp;nbsp; StackTrace:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMNode.selectSingleNode(String queryString)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust.DOMDocument50Wrapper.selectSingleNode(String queryString)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Form_Creator_A.FormCode.CTRL15_5_OnClick(DocActionEvent e) in C:\Users\Lawson\Documents\InfoPath Projects\Form Creator A1\FormCode.cs:line 121&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve gotten this code to run before. Does anybody know where I&amp;#39;m going wrong?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>