<?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: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/65644.aspx</link><pubDate>Thu, 31 Mar 2011 19:53:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:65644</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/65644.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=65644</wfw:commentRss><description>&lt;p&gt;Is there a way I can have this form submit as a PDF document to a SharePoint library instead of a network share?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61432.aspx</link><pubDate>Mon, 15 Nov 2010 18:09:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61432</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61432.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61432</wfw:commentRss><description>&lt;p&gt;I got it to work:&lt;/p&gt;
&lt;p&gt;string Filename = this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;/my:BaseTemplateFields/my:FullName&amp;quot;, this.NamespaceManager).Value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.CurrentView.Export(@&amp;quot;&lt;a&gt;\\Sharename\Folder\&lt;/a&gt;&amp;quot; + Filename + &amp;quot;.pdf&amp;quot;, Microsoft.Office.InfoPath.ExportFormat.Pdf);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again for all your help!.&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61418.aspx</link><pubDate>Mon, 15 Nov 2010 15:51:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61418</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61418.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61418</wfw:commentRss><description>&lt;p&gt;Using&amp;nbsp;the export to PDF...how do I use the field name instead of test.pdf&lt;/p&gt;
&lt;p&gt;Here is my code:&lt;/p&gt;
&lt;p&gt;this.CurrentView.Export(@&amp;quot;&lt;a&gt;\\Sharename\Folder\test.pdf&lt;/a&gt;&amp;quot;, Microsoft.Office.InfoPath.ExportFormat.Pdf);&lt;/p&gt;
&lt;p&gt;How can I change the exported file name to automatically use a field in my form called Fullname?&amp;nbsp; So say my field name value is Jane Smith, can I make the form be named Jane Smith.pdf?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61338.aspx</link><pubDate>Thu, 11 Nov 2010 23:51:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61338</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61338.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61338</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi, for that you can use:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string Filename = this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;Xpath&amp;quot;, this.NamespaceManager).Value;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;You have to replace Xpath by your own for that right click on your field on&amp;quot;Data source&amp;quot; and click copy Xpath, after at you paste it in the code.&lt;/p&gt;&lt;p&gt;&amp;nbsp;After that, you have to replace all your hardcoded path like:&lt;/p&gt;&lt;p&gt;this.SaveAs(@&amp;quot;&lt;a&gt;\\ServerName\Share\test.xml&lt;/a&gt;&amp;quot;);&lt;/p&gt;&lt;p&gt;by&lt;/p&gt;&lt;p&gt;this.SaveAs(@&amp;quot;&lt;a&gt;\\ServerName\Share\&amp;quot; + Filename  + &amp;quot;.xml&lt;/a&gt;&amp;quot;); &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61335.aspx</link><pubDate>Thu, 11 Nov 2010 21:40:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61335</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61335.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61335</wfw:commentRss><description>&lt;p&gt;Hi , &lt;/p&gt;
&lt;p&gt;So if I want to use a field in my form called &amp;quot;Lastname&amp;quot; with a value of &amp;quot;Smith&amp;quot;, how&amp;nbsp;can I force the form to automatically replace &amp;quot;test.pdf&amp;quot; with &amp;quot;Smith.pdf&amp;quot; ?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61331.aspx</link><pubDate>Thu, 11 Nov 2010 19:29:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61331</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61331.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61331</wfw:commentRss><description>&lt;p&gt;Hi, Yes you can use a field value instead of &amp;#39;tempFolder&amp;#39; and &amp;#39;Filename&amp;#39;&lt;/p&gt;
&lt;p&gt;I update the code to fit with &amp;#39;test.pdf&amp;#39;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process objP = new Process();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//open the pdf file&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.FileName = @&amp;quot;\\SHARE\test.pdf&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //Hide the window. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.Verb = &amp;quot;print&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.CreateNoWindow = true;//!! Don&amp;#39;t create a Window.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.UseShellExecute = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.Arguments = &amp;quot;/t /h \&amp;quot;&amp;quot;+&amp;quot;\\SHARE\test.pdf&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.Start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { }&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61323.aspx</link><pubDate>Thu, 11 Nov 2010 18:04:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61323</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61323.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61323</wfw:commentRss><description>&lt;p&gt;It doesn&amp;#39;t like when I change the values of &amp;#39;tempFolder&amp;#39; and &amp;#39;Filename&amp;#39;&lt;/p&gt;
&lt;p&gt;If I use: &lt;/p&gt;
&lt;p&gt;this.CurrentView.Export(@&amp;quot;\\SHARE\test.pdf&amp;quot;, Microsoft.Office.InfoPath.ExportFormat.Pdf);&lt;/p&gt;
&lt;p&gt;Is it possible to pull the filename from a field value in the form or maybe todays date and time instead of using &amp;#39;test&amp;#39; ?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61315.aspx</link><pubDate>Thu, 11 Nov 2010 14:59:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61315</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61315.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61315</wfw:commentRss><description>&lt;p&gt;Ok, add this namespace in front of the code :&lt;/p&gt;
&lt;p&gt;using System.Diagnostics;&lt;/p&gt;
&lt;p&gt;For&amp;nbsp; &amp;#39;tempFolder&amp;#39;&amp;nbsp;and &amp;#39;Filename&amp;#39;, you have to replace that by&amp;nbsp;your own path and filename.&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61313.aspx</link><pubDate>Thu, 11 Nov 2010 14:48:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61313</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61313.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61313</wfw:commentRss><description>&lt;p&gt;I added the try infront of the code, I get a few errors:&lt;/p&gt;
&lt;p&gt;The type or namespace name &amp;#39;Process&amp;#39; could not be found (are you missing a using directive or an assembly reference?)&amp;nbsp;&lt;br /&gt;The name &amp;#39;tempFolder&amp;#39; does not exist in the current context&lt;br /&gt;The name &amp;#39;Filename&amp;#39; does not exist in the current context&lt;br /&gt;The name &amp;#39;ProcessWindowStyle&amp;#39; does not exist in the current context&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61312.aspx</link><pubDate>Thu, 11 Nov 2010 14:42:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61312</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61312.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61312</wfw:commentRss><description>&lt;p&gt;Have you insert the&amp;quot;try&amp;quot; in front of the sample of code ?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61311.aspx</link><pubDate>Thu, 11 Nov 2010 14:21:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61311</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61311.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61311</wfw:commentRss><description>&lt;p&gt;Hi, thank you for all your help&amp;nbsp;on this, it&amp;#39;s greatly appreciated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I get an error at:&lt;/p&gt;
&lt;p&gt;}&lt;strong&gt;&lt;em&gt;syntax error, &amp;#39;try&amp;#39; expected&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;catch&lt;br /&gt;{ }&lt;/p&gt;
&lt;p&gt;What is the name of the tool to purchase?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61310.aspx</link><pubDate>Thu, 11 Nov 2010 14:11:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61310</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61310.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61310</wfw:commentRss><description>&lt;p&gt;Hi, it&amp;#39;s possible, this sample can do it but an adobe viewer window will open at the end of the print, it&amp;#39;s exist some other tool without this drawback but it&amp;#39;s not free.&lt;/p&gt;
&lt;p&gt;try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process objP = new Process();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//open the pdf file&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.FileName = tempFolder + &amp;quot;\\&amp;quot; + Filename;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //Hide the window. &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.Verb = &amp;quot;print&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.CreateNoWindow = true;//!! Don&amp;#39;t create a Window.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.UseShellExecute = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.StartInfo.Arguments = &amp;quot;/t /h \&amp;quot;&amp;quot; + tempFolder + &amp;quot;\\&amp;quot; + Filename;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.Start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objP.Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { }&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61308.aspx</link><pubDate>Thu, 11 Nov 2010 13:56:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61308</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61308.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61308</wfw:commentRss><description>&lt;p&gt;Awesome that worked!&lt;/p&gt;
&lt;p&gt;Is it possible to export the pdf to the share and also make it print out onto a network printer?&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61289.aspx</link><pubDate>Thu, 11 Nov 2010 00:49:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61289</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61289.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61289</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi, sorry for the &amp;quot;p&amp;quot; of Print().&lt;/p&gt;&lt;p&gt;The command to do that is :&lt;/p&gt;&lt;p&gt; this.CurrentView.Export(@&amp;quot;\\SHARE\test.pdf&amp;quot;, Microsoft.Office.InfoPath.ExportFormat.Pdf);&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Submit button that sends completed form to a network share and also prints the form</title><link>https://www.infopathdev.com:443/forums/thread/61280.aspx</link><pubDate>Wed, 10 Nov 2010 21:36:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:61280</guid><dc:creator>jambou9182</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/61280.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=61280</wfw:commentRss><description>&lt;p&gt;Hey, I got it to work by capitalizing the &amp;quot;p&amp;quot; in&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Print();&lt;/p&gt;
&lt;p&gt;Now, is it possible to have the form export to my share in .PDF format?&lt;/p&gt;</description></item></channel></rss>