My guess:
excel doesnt use the 32bit portname but it's 16bit sibling.
e.g. MyPrinter on Ne01:
manually set the printer to the one you want.
type ?ActivePrinter in the immediate pane.
use that string in your code.
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Cam wrote in
Hi, I just can't get this to work - I keep getting Runtime error 1004
? The aim is just to print to another printer called 'HP 1200 Tray 2'
Any tips would be great. Thanks.
*Sub Printer2()
Dim STDprinter As String
STDprinter = Application.ActivePrinter
Application.ActivePrinter = "HP 1200 Tray 2 on
HPBusinessInkjet1200:"
' change printer
ActiveSheet.PrintOut
' prints the active sheet
Application.ActivePrinter = STDprinter
' change back to standard printer
End Sub*