<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93808.aspx</link><pubDate>Mon, 21 Oct 2013 20:46:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93808</guid><dc:creator>NewbieBlues</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93808.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93808</wfw:commentRss><description>&lt;p&gt;Excellent - got that to work for the sections, thank you!&lt;/p&gt;
&lt;p&gt;Now, if I can get the .pdf quality increased this will be ready to go.&amp;nbsp; I&amp;#39;ll keep searching on that one.&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93806.aspx</link><pubDate>Mon, 21 Oct 2013 19:37:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93806</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93806.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93806</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Use two sections and conditional formatting to show / hide the one you want. We do that a lot for emailing. Here&amp;#39;s a link that may help: &lt;a href="http://www.infopathdev.com/forums/p/22656/78476.aspx"&gt;http://www.infopathdev.com/forums/p/22656/78476.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93805.aspx</link><pubDate>Mon, 21 Oct 2013 19:23:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93805</guid><dc:creator>NewbieBlues</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93805.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93805</wfw:commentRss><description>&lt;p&gt;It switches the view and executes the export.&amp;nbsp; From searching more, it seems the switch is the issue and that a lot of VB coding is necessary to overcome it (all of it beyond me).&amp;nbsp; That made me realize perhaps I&amp;#39;m overthinking it.&amp;nbsp; If I&amp;nbsp;instead used a single view with a page break, and set the page design properties to print&amp;nbsp;page 2 of 2, I hoped&amp;nbsp;the export would adhere to that - I tried it&amp;nbsp;just now,&amp;nbsp; but&amp;nbsp;it doesn&amp;#39;t.&amp;nbsp; However,&amp;nbsp;I was able to successfully export the view as a .pdf with a filename that matched the form field.&amp;nbsp; Unfortunately, along with it printing the unnecessary first page (where the user selects the data to populate the second page), the quality of the export is terrible.&amp;nbsp; It looks like a low-grade screenshot intead of a generated pdf.&amp;nbsp; I realize I expected it would work like MS Word when saving to PDF in terms of quality.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ll research more about the page number printing and pdf quality.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks,&lt;/p&gt;
&lt;p&gt;Andy&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93803.aspx</link><pubDate>Mon, 21 Oct 2013 18:45:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93803</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93803.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93803</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Is your button doing anything else? or just executing the code for the export?&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93802.aspx</link><pubDate>Mon, 21 Oct 2013 18:29:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93802</guid><dc:creator>NewbieBlues</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93802.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93802</wfw:commentRss><description>&lt;p&gt;Thank you - I &amp;#39;m executing the code from a button.&amp;nbsp; I will search online for the error message.&amp;nbsp; Thanks!&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93801.aspx</link><pubDate>Mon, 21 Oct 2013 17:39:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93801</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93801.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93801</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Where are you executing your code from? A button? A field change event? When the view is switching? Try searching online for the exact error message.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93800.aspx</link><pubDate>Mon, 21 Oct 2013 17:26:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93800</guid><dc:creator>NewbieBlues</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93800.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93800</wfw:commentRss><description>&lt;p&gt;Thank you!&amp;nbsp; Yes, you are correct:&amp;nbsp; I had the wrong XPath.&amp;nbsp; (sigh, ignorance is not bliss...)&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve corrected it and now receive an error message that &amp;quot;InfoPath cannot execute any view-related object model calls.&amp;nbsp; The view is not ready.&amp;quot;&lt;/p&gt;
&lt;p&gt;I had the same results when I instead tried to hardcode the value in the export statement.&lt;/p&gt;
&lt;p&gt;When I try to isolate the issue, it seems it&amp;#39;s occurring at:&lt;/p&gt;
&lt;p&gt;Me.CurrentView.Export(myFIELDVALUE, ExportFormat.Pdf)&lt;/p&gt;
&lt;p&gt;Thanks for your help so far&amp;nbsp;- if you have any further suggestions, please let me know.&lt;/p&gt;
&lt;p&gt;Thank you, again!&lt;/p&gt;</description></item><item><title>Re: How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93797.aspx</link><pubDate>Mon, 21 Oct 2013 15:46:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93797</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93797.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93797</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi - does your code work with a hardcoded value in the export statement? I&amp;#39;m going to guess that your XPath here is wrong:&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; myFIELDVALUE &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; = myNAV.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//myFIELD&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value&lt;/font&gt;&lt;/p&gt;&lt;p&gt;In the main data source of your form, in the designer, right click the field you want and select Copy XPath. Then paste that in the quotes where you have //myFIELD right now.&lt;/p&gt;</description></item><item><title>How to use field value to create the path for export method?</title><link>https://www.infopathdev.com:443/forums/thread/93786.aspx</link><pubDate>Mon, 21 Oct 2013 02:43:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:93786</guid><dc:creator>NewbieBlues</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/93786.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=93786</wfw:commentRss><description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I tried to modify&lt;/p&gt;&lt;pre&gt;&lt;span style="COLOR:blue;"&gt;	Me&lt;/span&gt;.CurrentView.Export(&lt;span style="COLOR:#a31515;"&gt;&amp;quot;C:\MyView.pdf&amp;quot;&lt;/span&gt;, ExportFormat.Pdf)
&lt;/pre&gt;
&lt;p&gt;by replacing &amp;quot;C:\MyView.pdf&amp;quot; with a field value.&amp;nbsp; My&amp;nbsp;form&amp;#39;s filename will change each time it&amp;#39;s generated and I am trying to create a button that will switch the view, then export that view to a .pdf file&amp;nbsp;saved to a&amp;nbsp;network location.&amp;nbsp; I create the &amp;nbsp;filename and path by concatenating a field with other text in a read-only textbox control.&lt;/p&gt;
&lt;p&gt;I call my button &amp;quot;b_CREATE&amp;quot; and my switched view &amp;quot;v_CREATE&amp;quot;.&amp;nbsp; I&amp;#39;ve enabled full trust but cannot get it to work without errors.&amp;nbsp; I&amp;#39;ve never programmed VB / InfoPath before, only VBA with Outlook and Word, and I&amp;#39;m fairly certain I&amp;#39;m missing something simple.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I&amp;#39;ll be very grateful for any guidance or help you might offer.&amp;nbsp; Here is the code I have:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; b_CREATE_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ClickedEventArgs)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.ViewInfos.SwitchView(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;v_CREATE&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myNAV &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; XPathNavigator = MainDataSource.CreateNavigator()&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myFIELDVALUE &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; = myNAV.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//myFIELD&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Value&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.CurrentView.Export(myFIELDVALUE, ExportFormat.Pdf)&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;</description></item></channel></rss>