<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Printing to PDF from VBA in Excel</title>
	<atom:link href="http://www.lejordet.com/2009/07/printing-to-pdf-from-vba-in-excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lejordet.com/2009/07/printing-to-pdf-from-vba-in-excel/</link>
	<description>online repository of stuff I had to google for hours to figure out</description>
	<lastBuildDate>Mon, 26 Jul 2010 14:55:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Lars Erik Jordet</title>
		<link>http://www.lejordet.com/2009/07/printing-to-pdf-from-vba-in-excel/comment-page-1/#comment-47</link>
		<dc:creator>Lars Erik Jordet</dc:creator>
		<pubDate>Fri, 23 Oct 2009 16:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.lejordet.com/?p=43#comment-47</guid>
		<description>You need to set the printer using the NetworkPrinter function specified above:

Application.ActivePrinter = NetworkPrinter(&quot;PS_Printer&quot;)

The NetworkPrinter function tries to detect which port the printer is on and set the printer string accordingly. If the string doesn&#039;t resolve to a proper printer (&quot;PS_Printer on PS_Port&quot;) it will use the default printer. 

Alternatively you can of course set .ActivePrinter = &quot;PS_Printer on PS_Port&quot; directly - the NetworkPrinter is more for when you use a physical printer which may or may not be on the same port on each computer in a network.</description>
		<content:encoded><![CDATA[<p>You need to set the printer using the NetworkPrinter function specified above:</p>
<p>Application.ActivePrinter = NetworkPrinter(&#8220;PS_Printer&#8221;)</p>
<p>The NetworkPrinter function tries to detect which port the printer is on and set the printer string accordingly. If the string doesn&#8217;t resolve to a proper printer (&#8220;PS_Printer on PS_Port&#8221;) it will use the default printer. </p>
<p>Alternatively you can of course set .ActivePrinter = &#8220;PS_Printer on PS_Port&#8221; directly &#8211; the NetworkPrinter is more for when you use a physical printer which may or may not be on the same port on each computer in a network.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Thompson</title>
		<link>http://www.lejordet.com/2009/07/printing-to-pdf-from-vba-in-excel/comment-page-1/#comment-46</link>
		<dc:creator>Keith Thompson</dc:creator>
		<pubDate>Fri, 23 Oct 2009 13:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.lejordet.com/?p=43#comment-46</guid>
		<description>Hi,

Thanks for the article, I think it may have solved a very big problem for us.  However, I have a problem getting it to work, unfortunately.  I have set up a dummy printer (call it &quot;PS_Printer&quot;) on a dummy port (&quot;PS_Port&quot;), and used the following code:

            ThisWorkbook.Sheets(SheetName).ActivePrinter = &quot;PS_Printer&quot;
            ThisWorkbook.Sheets(SheetName).PrintOut(FileName:=strFilename, Copies:=1, PrintToFile:=True, OutputFileName:=sOutputFilename)

..but the application still tries to print to the default printer.  Have I missed something?  I have tried using the dummy printer from Word, and it seems to work just fine, so I&#039;m wondering if the code is somehow &quot;missing&quot; the dummy printer.

Any help would be very gratefully accepted!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for the article, I think it may have solved a very big problem for us.  However, I have a problem getting it to work, unfortunately.  I have set up a dummy printer (call it &#8220;PS_Printer&#8221;) on a dummy port (&#8220;PS_Port&#8221;), and used the following code:</p>
<p>            ThisWorkbook.Sheets(SheetName).ActivePrinter = &#8220;PS_Printer&#8221;<br />
            ThisWorkbook.Sheets(SheetName).PrintOut(FileName:=strFilename, Copies:=1, PrintToFile:=True, OutputFileName:=sOutputFilename)</p>
<p>..but the application still tries to print to the default printer.  Have I missed something?  I have tried using the dummy printer from Word, and it seems to work just fine, so I&#8217;m wondering if the code is somehow &#8220;missing&#8221; the dummy printer.</p>
<p>Any help would be very gratefully accepted!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->