<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44801.aspx</link><pubDate>Wed, 22 Jul 2009 19:42:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44801</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44801.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44801</wfw:commentRss><description>&lt;p&gt;Ooooh, good thinking, Marc! just add a bit of nothing to the end of the string. How&amp;#39;d I&amp;#39;d love to know why the &lt;strong&gt;right&lt;/strong&gt; way doesn&amp;#39;t work tho!&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44769.aspx</link><pubDate>Wed, 22 Jul 2009 06:41:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44769</guid><dc:creator>MarcS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44769</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I like your attitude :-)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;As sPath is filled in from arguments, I tried this&lt;/p&gt;&lt;p&gt;Call ipApp.XDocuments.Open( sPath + &amp;quot;&amp;quot; ,&amp;nbsp; 8 )&lt;/p&gt;&lt;p&gt;And that works too!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for being stubborn Hilary!&lt;/p&gt;&lt;p&gt;Greetings,&lt;/p&gt;&lt;p&gt;Marc &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44724.aspx</link><pubDate>Tue, 21 Jul 2009 15:35:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44724</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44724.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44724</wfw:commentRss><description>&lt;p&gt;I just verified that I get the same behavior. That&amp;#39;s flat weird. However, since I&amp;#39;m stubborn, I tried this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sPath=&amp;quot;C:\base&amp;quot;&lt;br /&gt;Dim ipApp&lt;br /&gt;Set ipApp = CreateObject(&amp;quot;InfoPath.Application&amp;quot;)&lt;br /&gt;Call ipApp.XDocuments.Open(sPath + &amp;quot;.xml&amp;quot;,8)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And it worked....&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44635.aspx</link><pubDate>Mon, 20 Jul 2009 08:28:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44635</guid><dc:creator>MarcS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44635.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44635</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Basically the same code as the original poster:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;sPath=&amp;quot;C:\\base.xml&amp;quot;&lt;br /&gt;Dim ipApp&lt;br /&gt;Set ipApp = CreateObject(&amp;quot;InfoPath.Application&amp;quot;)&lt;br /&gt;Call ipApp.XDocuments.Open(sPath,8)&lt;/p&gt;&lt;p&gt;... some more code ... &lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;But, if I replace the Open-call like this:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&amp;nbsp;Call ipApp.XDocuments.Open(&amp;quot;c:\\base.xml&amp;quot;,8)&lt;/blockquote&gt;&lt;p&gt;then the script works fine.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;
&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44537.aspx</link><pubDate>Fri, 17 Jul 2009 15:03:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44537</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44537.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44537</wfw:commentRss><description>&lt;p&gt;Why don&amp;#39;t you post your code so we can see what might be going wrong for you?&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/44524.aspx</link><pubDate>Fri, 17 Jul 2009 09:09:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:44524</guid><dc:creator>MarcS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/44524.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=44524</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Feels odd to revive this thread, but I&amp;#39;m having the same problem as described and haven&amp;#39;t come up nor find a solution.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So I&amp;#39;m hoping that there is a solution around&amp;nbsp; &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/9339.aspx</link><pubDate>Sat, 18 Mar 2006 05:50:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9339</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9339.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9339</wfw:commentRss><description>Hi Pfazza and welcome to our life!&lt;br /&gt;&lt;br /&gt;Please try: &lt;br /&gt;sPath = "c:\\infopathtest.xml"</description></item><item><title>Re: Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/9338.aspx</link><pubDate>Fri, 17 Mar 2006 06:45:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9338</guid><dc:creator>pfazza</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9338.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9338</wfw:commentRss><description>My error:&lt;br /&gt;&lt;br /&gt;INCORRECT CODE FRAGMENT SHOULD READ&lt;br /&gt;&lt;br /&gt;sPath = "c:\infopathtest.xml"&lt;br /&gt;Set InfoPathApp = CreateObject("InfoPath.Application")&lt;br /&gt;Set myIFDoc = InfoPathApp.XDocuments.Open(sPath,1)&lt;br /&gt;myIFDoc.PrintOut</description></item><item><title>Help!  XDocuments.Open failure</title><link>https://www.infopathdev.com:443/forums/thread/5451.aspx</link><pubDate>Thu, 16 Mar 2006 16:34:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5451</guid><dc:creator>pfazza</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5451.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5451</wfw:commentRss><description>&lt;b&gt;&lt;br /&gt;'this code works fine&lt;/b&gt;&lt;br /&gt;Set InfoPathApp = CreateObject("InfoPath.Application")&lt;br /&gt;Set myIFDoc = InfoPathApp.XDocuments.Open("c:\infopathtest.xml",1)&lt;br /&gt;myIFDoc.PrintOut&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;'but this &lt;/b&gt;&lt;br /&gt;sPath = "c:\infopathtest.xml"&lt;br /&gt;Set InfoPathApp = CreateObject("InfoPath.Application")&lt;br /&gt;Set myIFDoc = InfoPathApp.XDocuments.Open("c:\infopathtest.xml",1)&lt;br /&gt;myIFDoc.PrintOut&lt;br /&gt;&lt;br /&gt;&lt;b&gt;fails with the Runtime Error:&lt;/b&gt;&lt;br /&gt;'Infopath has enountered an Error.  The operation failed. ?? Infopath cannot open the selected form.  The parameter is incorrect.&lt;br /&gt;&lt;br /&gt;Why?&lt;br /&gt;&lt;br /&gt;As you can see, the only difference in the code fragments is that i am assigning the filepath to a string.  I;ve tested this on two machines with two different configurations and also tested the corresponding action with Word Automation to check I wasn't doing something dopey.&lt;br /&gt;&lt;br /&gt;Any ideas, guys?  It really does seem like a lurgey in the API&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>