<?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: Printing through Code</title><link>https://www.infopathdev.com:443/forums/thread/28814.aspx</link><pubDate>Tue, 20 May 2008 13:25:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28814</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28814.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28814</wfw:commentRss><description>&lt;p&gt;The problem I have is that our form is using JScript, and so far i have found nothing that will help.&amp;nbsp; I know the PrintOut uses the default printer.&amp;nbsp; I am also using some ActiveXObjects to run different applications from my infopath form, and so i was wondering if there was something similar that would help me with the printing issue Infopath has.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Printing through Code</title><link>https://www.infopathdev.com:443/forums/thread/28802.aspx</link><pubDate>Mon, 19 May 2008 20:20:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28802</guid><dc:creator>barmatt80</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28802.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28802</wfw:commentRss><description>&lt;p&gt;I got this from another forum, haven&amp;#39;t tested it yet:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Dim P As Integer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim AvailablePrinters As String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For P = 0 To &lt;a class="iAs" style="BORDER-BOTTOM:darkgreen 0.07em solid;" href="http://www.tek-tips.com/viewthread.cfm?qid=1254639&amp;amp;page=1#" target="_blank"&gt;System&lt;/a&gt;.Drawing.Printing.PrinterSettings. _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;InstalledPrinters.Count - 1&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;AvailablePrinters = System.Drawing.Printing.PrinterSettings. _&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;InstalledPrinters.Item(P)&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;ListBox1.Items.Add(AvailablePrinters)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next&lt;/p&gt;
&lt;p&gt;That code is for pure vb.net , some adaptation i am sure for using in infopath, or totally rewritten debending on what code you are using.&amp;nbsp; But that should give you the list of installed printers and put in a list box.&amp;nbsp; then the user can select which one to print to. And maybe something like this: &lt;/p&gt;
&lt;p&gt;PrintDocument1.PrinterSettings.PrinterName = &amp;quot;Printer Name&amp;quot; &lt;/p&gt;
&lt;p&gt;to hard code a particular printer.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tested them, but i am curious as well.&amp;nbsp; I might try it tomorrow at work.&lt;/p&gt;</description></item><item><title>Printing through Code</title><link>https://www.infopathdev.com:443/forums/thread/28801.aspx</link><pubDate>Mon, 19 May 2008 19:28:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28801</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28801.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=28801</wfw:commentRss><description>&lt;p&gt;Has anyone come across a solution to print from infopath without having to use the default printer?&amp;nbsp; I know you can use the XDocument.PrintOut(), but i dont want the user to have to keep a certain default printer.&amp;nbsp; Is there any active x control or anything like that?&amp;nbsp; Thanks for your replies.&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>