<?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: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13191.aspx</link><pubDate>Tue, 03 May 2005 11:38:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13191</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13191.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13191</wfw:commentRss><description>Hi Lee, &lt;br /&gt;Sorry for the delay. I'll ask someone to post the code snippet.&lt;br /&gt;More soon,&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13190.aspx</link><pubDate>Mon, 25 Apr 2005 07:52:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13190</guid><dc:creator>Lee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13190.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13190</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;Where can i find that code snippet you mentioned?  I have tried looking around the site and maybe i have missed it, but i can't seem to find it.&lt;br /&gt;&lt;br /&gt;cheers&lt;br /&gt;&lt;br /&gt;Lee&lt;br /&gt;</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13189.aspx</link><pubDate>Sat, 23 Apr 2005 20:19:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13189</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13189.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13189</wfw:commentRss><description>Hi Lee,&lt;br /&gt;&lt;br /&gt;Thanks for posting the info on the limitations of Export. The SDK only has an example of exporting to a directory, but I agree it's not clear. Anyway, looks like it doesn't support WebDAV. &lt;br /&gt;&lt;br /&gt;I still think you are better off using the XSL Tool to do the downlevel since it will a) not require any code, b) not result in two files (which could get out of synch), and c) doesn't require full trust.&lt;br /&gt;&lt;br /&gt;Good luck!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13188.aspx</link><pubDate>Fri, 22 Apr 2005 13:45:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13188</guid><dc:creator>Lee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13188.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13188</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I have now got a work around for this problem as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;	var DECOID = XDocument.DOM.selectSingleNode("//my:DecoID").text;&lt;br /&gt;&lt;br /&gt;	XDocument.View.Export("c:\\DECO " + DECOID + ".doc", "MHT");&lt;br /&gt;	&lt;br /&gt;	var objApp = new ActiveXObject("Word.Application");&lt;br /&gt;	&lt;br /&gt;	objApp.Visible = false;&lt;br /&gt;	&lt;br /&gt;	objApp.Documents.Open("c:\\DECO " + DECOID + ".doc");&lt;br /&gt;	&lt;br /&gt;	objApp.ActiveDocument.SaveAs("http://server/sites/sitename/DocLib/DECO%20" + DECOID + ".doc");&lt;br /&gt;	&lt;br /&gt;	objApp.Quit();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Its a shame that the Export method did not meet up with expectations... the only way i could get the method to work was by using a local folder path instead of a network location.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Lee&lt;br /&gt;&lt;br /&gt;Lee A Newson</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13187.aspx</link><pubDate>Fri, 22 Apr 2005 00:05:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13187</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13187.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13187</wfw:commentRss><description>Hi again,&lt;br /&gt;&lt;br /&gt;Why not just create a view onto the XML using the XSL Tool in the SDK? That way, you won't have two versions of the XML file and you don't have to be full trust. We do this all the time. In fact, I believe we have a snippet of code lying around that you can add to a column on your SharePoint view to create a link that when clicked will render the form as HTML. &lt;br /&gt;&lt;br /&gt;Of course, Export should work too. What is the exact error message? Do you have doc lib created? &lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13186.aspx</link><pubDate>Thu, 21 Apr 2005 08:09:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13186</guid><dc:creator>Lee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13186.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13186</wfw:commentRss><description>Hi Patrick,&lt;br /&gt;&lt;br /&gt;Yes my form is full trust, to test this functionality i had to grant it full trust and then install it as you cannot test full trust functionality just by previewing the form.&lt;br /&gt;&lt;br /&gt;The way i have done it is that i have a button at the bottom of the form, which, when pressed starts a rule to submit the form to a form library using a data connection (this part works), and in the onclick event for the button i have some custom code that should perform the export to a document library on the same site as the form library, but the form falls over when it gets to the XDocument.View.Export() line.&lt;br /&gt;&lt;br /&gt;any ideas?&lt;br /&gt;&lt;br /&gt;Lee A Newson</description></item><item><title>Re: Export method</title><link>https://www.infopathdev.com:443/forums/thread/13185.aspx</link><pubDate>Tue, 19 Apr 2005 01:45:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13185</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13185.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13185</wfw:commentRss><description>Hi Lee,&lt;br /&gt;Is your form full-trust? Export requires security level 3 (full trust). I hope this helps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Export method</title><link>https://www.infopathdev.com:443/forums/thread/12443.aspx</link><pubDate>Mon, 18 Apr 2005 14:04:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12443</guid><dc:creator>Lee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12443.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12443</wfw:commentRss><description>Hi&lt;br /&gt;&lt;br /&gt;I want to programmatically export a form to a document library on a SharePoint installation.&lt;br /&gt;&lt;br /&gt;At the moment the form throws an error when it gets the exportline in the code.  Does the export method support exporting to a network location?? if not is there another way to do it?&lt;br /&gt;&lt;br /&gt;i am currently using the following line of code to export the form...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;XDocument.View.Export("http://server/sites/sitename/doclib/formname", "MHT")&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;cheers for any help it is greatly appreciated&lt;br /&gt;&lt;br /&gt;regards&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lee A Newson</description></item></channel></rss>