ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using non-default printer on start-up (https://www.excelbanter.com/excel-discussion-misc-queries/166024-using-non-default-printer-start-up.html)

Andrew Felsenstein

Using non-default printer on start-up
 
Is there a way I can set excel to always use a specific printer rather than
the default? This is something I need set on open.

Right now I have to change the default printer before I open excel, and
change it back after I have closed it. If I don't do this, the formating on
my document gets changed on open to use the default printer settings rather
than the printer I need to use instead.

Basically instead of printing to a laser printer, I need to use a dot matrix
for carbonless forms.

Gord Dibben

Using non-default printer on start-up
 
For a particular workbook only.

Add to Thisworkbook module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:"
End Sub


Adjust for the printer you want to use.


Gord Dibben MS Excel MVP



On Wed, 14 Nov 2007 09:07:03 -0800, Andrew Felsenstein <Andrew
wrote:

Is there a way I can set excel to always use a specific printer rather than
the default? This is something I need set on open.

Right now I have to change the default printer before I open excel, and
change it back after I have closed it. If I don't do this, the formating on
my document gets changed on open to use the default printer settings rather
than the printer I need to use instead.

Basically instead of printing to a laser printer, I need to use a dot matrix
for carbonless forms.



Andrew Felsenstein[_2_]

Using non-default printer on start-up
 
Thank your for the suggestion. I tried it, but it still tries to default to
windows default printer and tries to re-format the document using the windows
default printer properties. I notice when I hover over the printer icon it
shows the windows default printer as well.

I tried this on 2 different PC's and got the same results. I have even
tried changing the printer properties from using spooling to printing
directly.

The windows default printer is a network printer. The printer I want to
print to is directly hooked to the PC via LPT1.

Any other suggestions?

"Gord Dibben" wrote:

For a particular workbook only.

Add to Thisworkbook module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:"
End Sub


Adjust for the printer you want to use.


Gord Dibben MS Excel MVP



On Wed, 14 Nov 2007 09:07:03 -0800, Andrew Felsenstein <Andrew
wrote:

Is there a way I can set excel to always use a specific printer rather than
the default? This is something I need set on open.

Right now I have to change the default printer before I open excel, and
change it back after I have closed it. If I don't do this, the formating on
my document gets changed on open to use the default printer settings rather
than the printer I need to use instead.

Basically instead of printing to a laser printer, I need to use a dot matrix
for carbonless forms.




Andrew Felsenstein[_2_]

Using non-default printer on start-up
 
I figured it out. I made a slight change to your module. I used:

Private Sub Workbook_OnOpen(Cancel As Boolean)
Application.ActivePrinter = "Genicom 3810S on LPT1:"
End Sub

Works perfect now. Thanks for your help!!

"Gord Dibben" wrote:

For a particular workbook only.

Add to Thisworkbook module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:"
End Sub


Adjust for the printer you want to use.


Gord Dibben MS Excel MVP



On Wed, 14 Nov 2007 09:07:03 -0800, Andrew Felsenstein <Andrew
wrote:

Is there a way I can set excel to always use a specific printer rather than
the default? This is something I need set on open.

Right now I have to change the default printer before I open excel, and
change it back after I have closed it. If I don't do this, the formating on
my document gets changed on open to use the default printer settings rather
than the printer I need to use instead.

Basically instead of printing to a laser printer, I need to use a dot matrix
for carbonless forms.




Gord Dibben

Using non-default printer on start-up
 
That was going to be my first suggestion but went with the other.

Did not test thoroughly.

Glad you're sorted.

BTW..........should be just a workbook_open sub

Private Sub Workbook_Open()
Application.ActivePrinter = "Genicom 3810S on LPT1:"
End Sub


Gord


On Wed, 14 Nov 2007 11:52:01 -0800, Andrew Felsenstein
wrote:

I figured it out. I made a slight change to your module. I used:

Private Sub Workbook_OnOpen(Cancel As Boolean)
Application.ActivePrinter = "Genicom 3810S on LPT1:"
End Sub

Works perfect now. Thanks for your help!!

"Gord Dibben" wrote:

For a particular workbook only.

Add to Thisworkbook module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:"
End Sub


Adjust for the printer you want to use.


Gord Dibben MS Excel MVP



On Wed, 14 Nov 2007 09:07:03 -0800, Andrew Felsenstein <Andrew
wrote:

Is there a way I can set excel to always use a specific printer rather than
the default? This is something I need set on open.

Right now I have to change the default printer before I open excel, and
change it back after I have closed it. If I don't do this, the formating on
my document gets changed on open to use the default printer settings rather
than the printer I need to use instead.

Basically instead of printing to a laser printer, I need to use a dot matrix
for carbonless forms.






All times are GMT +1. The time now is 10:19 AM.

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