<?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>Printing to 2 different printers</title><link>https://www.infopathdev.com:443/forums/thread/40217.aspx</link><pubDate>Wed, 01 Apr 2009 13:04:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40217</guid><dc:creator>pineapple23</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40217.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40217</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;m pretty new to infopath, and have very little experience with coding of any kind. What i need to do is to be able to print a view (my print View) on 2 separate network printers at the same time at the press of a button. I did some googling and found some code. (which i dont exactly understand, but nevermind)&lt;/p&gt;
&lt;p&gt;Dim sDefault As String &lt;br /&gt;&amp;nbsp;&lt;br /&gt;Dim sOtherPrint As String &lt;br /&gt;&amp;nbsp;&lt;br /&gt;sDefault = &amp;quot;&lt;a&gt;\\UPSCOMP\UPS&lt;/a&gt; Thermal 2543&amp;quot; &lt;br /&gt;&amp;nbsp;&lt;br /&gt;sOtherPrint = &amp;quot;&lt;a&gt;\\3MACHINECONTROL\UPS&lt;/a&gt;&amp;quot; &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;#39;&amp;#39;&amp;#39;print the document with default printer &lt;br /&gt;&amp;nbsp;&lt;br /&gt;ActiveDocument.PrintOut &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;#39;&amp;#39;&amp;#39;change the active printer &lt;br /&gt;&amp;nbsp;&lt;br /&gt;Application.ActivePrinter = sOtherPrint &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;#39;&amp;#39;&amp;#39;print the document with the other printer &lt;br /&gt;&amp;nbsp;&lt;br /&gt;ActiveDocument.PrintOut &lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;#39;&amp;#39;&amp;#39;reset the defualt printer &lt;br /&gt;&amp;nbsp;&lt;br /&gt;Application.ActivePrinter = sDefault &lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried pasting this into the script editor, using what i asssume to be the addresses for my printers (NB not the ones given in the above example). Firstly, could someone please tell me how to actualluy find the required addresses for my printers. Secondly, my problem is that when i attempt to preview this form it gives a message:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;InfoPath cannot open the selected form because of an error in the form&amp;#39;s code.&lt;br /&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;Expected &amp;#39;;&amp;#39;&lt;br /&gt;File:script.js&lt;br /&gt;Line:24&lt;br /&gt;Dim sDefault As String &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;please help! many thanks!&lt;/p&gt;</description></item></channel></rss>