Page 1 of 1

Printer Name/Port problem - Win 7 eXcel 2003

Posted: Thu Jan 20, 2011 10:08 am
by techedgeau
Using eXcel 2003 on Win-7, I'm trying to print to the BullZip printer, which installs on port BULLZIP. When trying to set "ActivePrinter" I get Run-time error '1004'.
The eXcel VBA code below works for CutePDF when I have the line:

ActivePrinter ="CutePDF Writer on CPW2:

but when I use

ActivePrinter = "Bullzip PDF Printer on BULLZIP"

.. I get the error 1004. Here's my "working" code, but commented to use the BullZip printer which WIn-7 tells me is installed on port BULLZIP, whereas my CutePDF is on port CPW2:
-------------------------------------
Public Sub Print_PDF()
Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
'-----ActivePrinter = "CutePDF Writer on CPW2:" '<--- works!
ActivePrinter = "Bullzip PDF Printer on BULLZIP" '<--- BROKEN!!!
ActiveSheet.PrintOut
ActivePrinter = sCurrentPrinter
End Sub
-------------------------------------
I'm sure there's a simple explanation? Sems to me the port is not correct.
I even thought to use the code at http://support.microsoft.com/kb/q166008/ to see if that gave me any inspiration, but of course the results do not mention the (necessary) port at all! Anyway, here's the output showing the CutePDF and BullZip lines returned by that code:
-------------------------------------
There are 5 local and connected printers.
Printer: Bullzip PDF Printer Server: Attributes: 240
...
Printer: CutePDF Writer Server: Attributes: 240
-------------------------------------

Any ideas?