<?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: open a form from anohter form and export the opene</title><link>https://www.infopathdev.com:443/forums/thread/14271.aspx</link><pubDate>Thu, 02 Feb 2006 15:11:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14271</guid><dc:creator>dhtroy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14271.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14271</wfw:commentRss><description>Try adding a default wait value in between your XDocuments.Open call and the View.Export. &lt;br /&gt;&lt;br /&gt;The XDocument probably hasn't completed the transform of the page yet. &lt;br /&gt;&lt;br /&gt;Also, there maybe a property or method you can use that tells you the 'state' of a loading/loaded document, but you'll have to look for it, because I'm not 100% positive that InfoPath exposes this ...&lt;br /&gt;&lt;br /&gt;D.</description></item><item><title>open a form from anohter form and export the opene</title><link>https://www.infopathdev.com:443/forums/thread/12762.aspx</link><pubDate>Tue, 31 Jan 2006 15:41:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12762</guid><dc:creator>Mancha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12762.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12762</wfw:commentRss><description>Hi to all,&lt;br /&gt;&lt;br /&gt;From one form I open another form by code (C#). I have to export the view from the opened form.&lt;br /&gt;&lt;br /&gt;The code is &lt;br /&gt;&lt;pre&gt;XDocument xDocPrevious = thisApplication.XDocuments.Open("c:\\openFile.xml", 1);&lt;br /&gt;DocPrevious.View.Export(Environment.GetFolderPath("C:\\test.mht", "MHT");&lt;/pre&gt; &lt;br /&gt;It seems an error when the opened form is exported. The error is that the view isn't ready. What should I do?&lt;br /&gt;</description></item></channel></rss>