<?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: InfoPath 2007 Export Automation</title><link>https://www.infopathdev.com:443/forums/thread/66034.aspx</link><pubDate>Tue, 19 Apr 2011 22:42:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:66034</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/66034.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=66034</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Glad we could help you.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Export Automation</title><link>https://www.infopathdev.com:443/forums/thread/65400.aspx</link><pubDate>Wed, 23 Mar 2011 22:07:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65400</guid><dc:creator>Nancy Young</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65400.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=65400</wfw:commentRss><description>&lt;p&gt;Thanks for the smack upside the head - we did indeed have validation errors in the UNSAVED (we would have found it in the client app when we tried to save) form, from which we tried to PDF a view.&lt;/p&gt;
&lt;p&gt;nsy&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Export Automation - Export as PDF</title><link>https://www.infopathdev.com:443/forums/thread/51318.aspx</link><pubDate>Tue, 02 Feb 2010 19:22:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51318</guid><dc:creator>RW5207</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51318.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=51318</wfw:commentRss><description>&lt;p&gt;I am using currentview.export to export the current view of the form to a pdf file.&amp;nbsp; I have been having mixed results.&amp;nbsp; Sometimes it works, other times I get an error.&amp;nbsp; The error I&amp;#39;m getting at the moment, and displaying in a message box&amp;nbsp;is&lt;/p&gt;
&lt;p&gt;&amp;quot;InfoPath has encountered an error.&amp;nbsp; The operation failed.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;InfoPath cannot export the form.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;The process cannot access the file because it is being used by another process.&amp;quot;&lt;/p&gt;
&lt;p&gt;The filename I&amp;#39;m exporting to is C:\InfoPath\TestForm.pdf.&amp;nbsp; I thought at first I encountered a filename length limitation of some sort, because it was failing every time I exported a file whose name was &amp;gt; 40 characters.&amp;nbsp; Now, however, I&amp;#39;m getting the error on short file names.&lt;/p&gt;
&lt;p&gt;I have created a very simple form with nothing on it except a text box and a few buttons.&amp;nbsp; I can debug the code and catch the error in the code:&lt;/p&gt;
&lt;p&gt;this.CurrentView.Export(xpsFormName, ExportFormat.Pdf);&lt;/p&gt;
&lt;p&gt;The xpsFormName variable shows that it has a valid filename.&amp;nbsp; Overall, it should be pretty simple.&amp;nbsp; I&amp;#39;m just wondering why, at times (now more often) I&amp;#39;m getting this error.&amp;nbsp; I&amp;#39;m also programmatically writing the XML file to the same folder and that is working just fine.&amp;nbsp; It appears to be something unique to the export as PDF function (yes, I have the extension installed).&lt;/p&gt;
&lt;p&gt;Full trust is selected, the form is digitially signed and it works sometimes.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Could it be that it&amp;#39;s having a problem loading the assembly that provides the conversion?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: InfoPath 2007 Export Automation</title><link>https://www.infopathdev.com:443/forums/thread/15205.aspx</link><pubDate>Wed, 28 Mar 2007 17:40:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15205</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15205.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15205</wfw:commentRss><description>I've never used this feature yet, but due to the randomness, a wild-guess would be to check whether having errors in the form might be the source of your trouble (i.e. required fields not being filled in). I wouldn't expect this to be a problem, but hey--you never know!</description></item><item><title>InfoPath 2007 Export Automation</title><link>https://www.infopathdev.com:443/forums/thread/13095.aspx</link><pubDate>Wed, 28 Mar 2007 07:45:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13095</guid><dc:creator>asms</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13095.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13095</wfw:commentRss><description>Hi,&lt;br /&gt;I am trying to automate InfoPath 2007 PDF export operation in a windows application.&lt;br /&gt;I am using a FormControl to open an InfoPath form and then do the export using &lt;br /&gt;&lt;br /&gt;FormControl1.XmlForm.CurrentView.Export("C:\myForm.pdf", format)&lt;br /&gt;&lt;br /&gt;this sometimes works and sometimes gives an exception. Here I cant figure out a pattern :-(&lt;br /&gt;&lt;br /&gt;&lt;font color="red"&gt;InfoPath has encountered an error. The operation failed.&lt;br /&gt;&lt;br /&gt;InfoPath cannot export the form.&lt;br /&gt;The parameter is incorrect.&lt;/font id="red"&gt;&lt;br /&gt;&lt;br /&gt;Could anyone help me figure out what is going wrong here?&lt;br /&gt;Thanks in advance&lt;br /&gt;ASMS&lt;br /&gt;</description></item></channel></rss>