ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Specific Printer (https://www.excelbanter.com/excel-programming/385539-specific-printer.html)

bw

Specific Printer
 
I am using this code to print to my Cannon printer, and the code works
fine.
Application.ActivePrinter = "Canon i560 on LPT1:"
Sheets("Register").PrintOut Copies:=1

For another printer, I am using this code, which DOES NOT work.
Application.ActivePrinter = "Canon i250 on USB001:"
Sheets("Register").PrintOut Copies:=1

When looking at the properties for the Canon i250 printer, I see the
following information:
Port: USB001
Description: Virtual printer port for USB
Printer: Canon i250

Can someone explain what I'm doing wrong?


Dave Peterson

Specific Printer
 
I don't have a guess what you're doing wrong, but the way I'd determine the real
name to use is to record a macro when I changed printers manually.

Then I should end up with the correct string.

(Or did you try that???????)

bw wrote:

I am using this code to print to my Cannon printer, and the code works
fine.
Application.ActivePrinter = "Canon i560 on LPT1:"
Sheets("Register").PrintOut Copies:=1

For another printer, I am using this code, which DOES NOT work.
Application.ActivePrinter = "Canon i250 on USB001:"
Sheets("Register").PrintOut Copies:=1

When looking at the properties for the Canon i250 printer, I see the
following information:
Port: USB001
Description: Virtual printer port for USB
Printer: Canon i250

Can someone explain what I'm doing wrong?


--

Dave Peterson

bw

Specific Printer
 
Dave,

No, I didn't try that (before my original post). On your suggestion, I
did give it a try and it now works. It came up with something that I
would have never been able to determine, without recording the macro.

Thanks much for your help.
Bernie


"Dave Peterson" wrote in message
...
I don't have a guess what you're doing wrong, but the way I'd determine
the real
name to use is to record a macro when I changed printers manually.

Then I should end up with the correct string.

(Or did you try that???????)

bw wrote:

I am using this code to print to my Cannon printer, and the code
works
fine.
Application.ActivePrinter = "Canon i560 on LPT1:"
Sheets("Register").PrintOut Copies:=1

For another printer, I am using this code, which DOES NOT work.
Application.ActivePrinter = "Canon i250 on USB001:"
Sheets("Register").PrintOut Copies:=1

When looking at the properties for the Canon i250 printer, I see the
following information:
Port: USB001
Description: Virtual printer port for USB
Printer: Canon i250

Can someone explain what I'm doing wrong?


--

Dave Peterson



Dave Peterson

Specific Printer
 
Thank goodness for the recorder!

bw wrote:

Dave,

No, I didn't try that (before my original post). On your suggestion, I
did give it a try and it now works. It came up with something that I
would have never been able to determine, without recording the macro.

Thanks much for your help.
Bernie

"Dave Peterson" wrote in message
...
I don't have a guess what you're doing wrong, but the way I'd determine
the real
name to use is to record a macro when I changed printers manually.

Then I should end up with the correct string.

(Or did you try that???????)

bw wrote:

I am using this code to print to my Cannon printer, and the code
works
fine.
Application.ActivePrinter = "Canon i560 on LPT1:"
Sheets("Register").PrintOut Copies:=1

For another printer, I am using this code, which DOES NOT work.
Application.ActivePrinter = "Canon i250 on USB001:"
Sheets("Register").PrintOut Copies:=1

When looking at the properties for the Canon i250 printer, I see the
following information:
Port: USB001
Description: Virtual printer port for USB
Printer: Canon i250

Can someone explain what I'm doing wrong?


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 02:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com