<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/95766.aspx</link><pubDate>Mon, 10 Feb 2014 05:54:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95766</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95766.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=95766</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You can use a &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog(v=vs.110).aspx"&gt;SaveFileDialog&lt;/a&gt; (built into .NET) to allow the user to select a file name, and then provide that value to the &lt;strong&gt;Export()&lt;/strong&gt; method.&lt;/p&gt;&lt;p&gt;The code sample on the MSDN page shows how to open a stream for the selected file, but instead of doing that, you can access the &lt;strong&gt;.FileName&lt;/strong&gt; property when &lt;strong&gt;ShowDialog()&lt;/strong&gt; completes to get the path to use.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/95698.aspx</link><pubDate>Wed, 05 Feb 2014 22:50:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:95698</guid><dc:creator>codediva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/95698.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=95698</wfw:commentRss><description>&lt;p&gt;Hilary, &lt;/p&gt;&lt;p&gt;This solution works perfectly.&amp;nbsp; Is there a way to achieve this but have the save as box appear and allow the user to select where the pdf file saves to?&amp;nbsp; &lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78686.aspx</link><pubDate>Wed, 16 May 2012 21:00:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78686</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78686.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78686</wfw:commentRss><description>&lt;p&gt;Oh, that will be fun for you, won&amp;#39;t it? Glad you got the code working, though.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78679.aspx</link><pubDate>Wed, 16 May 2012 19:38:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78679</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78679.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78679</wfw:commentRss><description>&lt;p&gt;I was thinking I had to include all the code on the MSDN page.&amp;nbsp; Works now.&amp;nbsp; Thanks.&lt;/p&gt;
&lt;p&gt;Works with the exception of the security issue; I now have to convince my sys admin to allow signed InfoPath forms to run in Full Trust.&amp;nbsp; Don&amp;#39;t suppose you could help there (ha ha)?&lt;/p&gt;
&lt;p&gt;~Dustin.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78678.aspx</link><pubDate>Wed, 16 May 2012 19:27:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78678</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78678.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78678</wfw:commentRss><description>&lt;p&gt;See, all I was figuring was you&amp;#39;d add a click event and add this sample line from the MSDN page.... I don&amp;#39;t know why you are overriding Export?&lt;/p&gt;
&lt;p&gt;&lt;span style="COLOR:blue;"&gt;&lt;span style="COLOR:blue;"&gt;Me&lt;/span&gt;&lt;font color="#000000"&gt;.CurrentView.Export(&lt;/font&gt;&lt;span&gt;&amp;quot;C:\MyView.pdf&amp;quot;&lt;/span&gt;&lt;font color="#000000"&gt;, ExportFormat.Pdf)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78677.aspx</link><pubDate>Wed, 16 May 2012 19:04:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78677</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78677</wfw:commentRss><description>&lt;p&gt;No.&amp;nbsp; I figured it was a Public Sub, so added under the default Public Class FormCode.&amp;nbsp; See below.&lt;/p&gt;
&lt;p&gt;Screenshot: &lt;a href="http://rookery9.aviary.com.s3.amazonaws.com/14254500/14254724_48db_625x625.jpg"&gt;http://rookery9.aviary.com.s3.amazonaws.com/14254500/14254724_48db_625x625.jpg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nothing under the Click event yet.&lt;/p&gt;
&lt;p&gt;~Dustin.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78676.aspx</link><pubDate>Wed, 16 May 2012 18:53:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78676</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78676</wfw:commentRss><description>&lt;p&gt;Ummm.... where are you putting your code, exactly? On a button? You opened the button properties and selected edit code and added the code to the button clicked event?&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78674.aspx</link><pubDate>Wed, 16 May 2012 18:35:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78674</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78674.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78674</wfw:commentRss><description>&lt;p&gt;I started this form in InfoPath 2003.&amp;nbsp; Rather than try to gut it and replace with 2010 functionality, I&amp;#39;m starting a blank project in 2010 to test this functionality.&lt;/p&gt;
&lt;p&gt;I throw the code in my brand new blank form and get a vb error: &lt;/p&gt;
&lt;p&gt;&amp;#39;MustOverride&amp;#39; cannot be specified on &amp;#39;Public MustOverride Sub Export(fileLocation As String, format As &amp;lt;unrecognized type&amp;gt;)&amp;#39; because it is in a partial type that is declared &amp;#39;NotInheritable&amp;#39; in another partial definition.&lt;/p&gt;
&lt;p&gt;So after quadruple reading the MSDN doc, I suspect trusts to be a problem.&amp;nbsp; the new InfoPath doc is set ot Full Trust, I even give it a signed security certificate.&amp;nbsp; I try to open the form in Filler and get:&lt;/p&gt;
&lt;p&gt;&amp;quot;The form template cannot be opened, because the system administrator has disabled opening form templates that require full trust.&amp;quot;&lt;/p&gt;
&lt;p&gt;Think this is associated with the previous &amp;quot;MustOverride&amp;quot; error?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;~Dustin.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78664.aspx</link><pubDate>Wed, 16 May 2012 16:46:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78664</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78664.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78664</wfw:commentRss><description>&lt;p&gt;My form type was set to &amp;#39;InfoPath 2003 Filler Form&amp;#39; as I started this in InfoPath 2003, just recently got upgraded.&amp;nbsp; I selected &amp;#39;InfoPath Filler Form.&amp;#39;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Also per the MSDN doc, I ensured I had &amp;#39;Full Trust&amp;#39; selected.&lt;/p&gt;
&lt;p&gt;Still build errors when&amp;nbsp;I preview the form.&lt;/p&gt;
&lt;p&gt;MSDN doc says i should be working in the Namespace: &amp;#39;Microsoft.Office.InfoPath.&amp;#39;&amp;nbsp; When I check, my code says: &lt;/p&gt;
&lt;p&gt;&amp;lt;InfoPathNamespace(&amp;quot;xmlns:my=&amp;quot;&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-03-05T14:10:56"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-03-05T14:10:56&lt;/a&gt;&amp;quot;&amp;quot; xmlns:xsi=&amp;quot;&amp;quot;&lt;a href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/a&gt;&amp;quot;&amp;quot; xmlns:ns1=&amp;quot;&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-03-09T13:26:16"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2012-03-09T13:26:16&lt;/a&gt;&amp;quot;&amp;quot; xmlns:xhtml=&amp;quot;&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&amp;quot;&amp;quot; xmlns:xd=&amp;quot;&amp;quot;&lt;a href="http://schemas.microsoft.com/office/infopath/2003"&gt;http://schemas.microsoft.com/office/infopath/2003&lt;/a&gt;&amp;quot;&amp;quot;&amp;quot;)&amp;gt; _&lt;/p&gt;
&lt;p&gt;Just guessing this is a problem, as it references the 2003 schema.&amp;nbsp; Is there a way to &amp;#39;upgrade&amp;#39; my namespace without losing everything?&amp;nbsp; i.e. if I copy and paste new namespace into here will it hose everything?&lt;/p&gt;
&lt;p&gt;~Dustin.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78654.aspx</link><pubDate>Wed, 16 May 2012 15:51:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78654</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78654.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78654</wfw:commentRss><description>&lt;p&gt;Is your form set to be a Filler not a Browser form? From the MSDN doc:&lt;/p&gt;
&lt;p&gt;This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78653.aspx</link><pubDate>Wed, 16 May 2012 15:08:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78653</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78653.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78653</wfw:commentRss><description>&lt;p&gt;Beautiful!&lt;/p&gt;
&lt;p&gt;The VB code is easy enough to follow what it is doing.&amp;nbsp; So I copy and paste into VSTA, but get a blue squiggly line under it and &amp;quot;Type &amp;#39;ExportFormat&amp;#39; is not defined&amp;quot; message.&lt;/p&gt;
&lt;p&gt;It has been years since i did any coding.&amp;nbsp; do I have to import any libraries or anything?&amp;nbsp; How was I supposed to define ExportFormat?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;~Dustin.&lt;/p&gt;</description></item><item><title>Re: Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78530.aspx</link><pubDate>Fri, 11 May 2012 23:55:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78530</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78530.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78530</wfw:commentRss><description>&lt;p&gt;You&amp;#39;ll have to write code, I&amp;#39;m afraid, and the form will need to be filler and full trust. Here&amp;#39;s an MSDN &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.view.export.aspx"&gt;page&lt;/a&gt; that has a code sample.&lt;/p&gt;</description></item><item><title>Publish to PDF button</title><link>https://www.infopathdev.com:443/forums/thread/78505.aspx</link><pubDate>Fri, 11 May 2012 12:38:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:78505</guid><dc:creator>dustbin111</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/78505.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=78505</wfw:commentRss><description>&lt;p&gt;InfoPath 2010:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;How can I &amp;nbsp;create a button that publishes to PDF?&lt;/p&gt;
&lt;p&gt;Instead of the user going to &amp;quot;File&amp;quot; --&amp;gt; &amp;quot;Info&amp;quot; --&amp;gt; &amp;quot;Publish as PDF or XPS&amp;quot;, I just want them to hit a button on my view an it prints to PDF.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;How do I invoke the &amp;quot;Publish as PDF&amp;quot; function in a button?&lt;/p&gt;</description></item></channel></rss>