<?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: Setting form name for printing as PDF</title><link>https://www.infopathdev.com:443/forums/thread/57862.aspx</link><pubDate>Wed, 11 Aug 2010 07:29:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57862</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57862.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57862</wfw:commentRss><description>&lt;p&gt;To be honest, I would like to know the answer to your question as well but I want a codeless solution. Using code, anything is possible. We set the form name today on load and that actually maps through to the PDF utility that we use. I&amp;#39;m thinking we need to add some rule to our qRules library that just sets the form name. Send me a private email if you are interested in beta testing that.&lt;/p&gt;</description></item><item><title>Setting form name for printing as PDF</title><link>https://www.infopathdev.com:443/forums/thread/57847.aspx</link><pubDate>Tue, 10 Aug 2010 16:26:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57847</guid><dc:creator>dammitandy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57847.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57847</wfw:commentRss><description>We have some custom print code to print an Infopath form on the user&amp;#39;s default printer as well as a server-based PDF printer for loading into a document management system.  This is working perfectly, but we would like to control the name of the generated PDF file.  The PDF print utility can automatically generate a file name using various parameters such as file name, current date/time, etc.  Since we cannot programmatically interface with the PDF print utility, the easiest way to control the name of the generated file would be to set the file name in InfoPath and allow the utility to append a date/time stamp.
&lt;br /&gt;&lt;br /&gt;
I have tried setting the form caption as described in the forum thread &lt;a href="http://www.infopathdev.com/forums/p/6049/22478.aspx"&gt;here&lt;/a&gt; and setting the Save As file name as described in the forum thread &lt;a href="http://www.infopathdev.com/forums/p/7846/28723.aspx"&gt;here&lt;/a&gt;, but regardless, the PDF print utility still uses the default form name (Form1, Form2, etc.).  Is there another way to set the form name in code?
&lt;br /&gt;&lt;br /&gt;
Thanks in advance for your help!</description></item></channel></rss>