Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Code to Print to certain Printer

Is it possible via code to print to a certain printer?

The relevant printer is on a network

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Code to Print to certain Printer

Hi John

With VBA you can change the ActivePrinter and print the sheet.
And set it back to your default

You can change the ActivePrinter to the printer you want like this
Application.ActivePrinter = "hp officejet k series on Ne00:"

To know the names of your pinters
Change to it in the ctrl P dialog (Cancel after you choose the printer )
and run this so you know the name

Sub nameprinter()
MsgBox Application.ActivePrinter
End Sub

If you print with code then look also at Printout in the VBA help
You can fill in the name of the printer in the arguments


--
Regards Ron de Bruin
http://www.rondebruin.nl


"John" wrote in message ...
Is it possible via code to print to a certain printer?

The relevant printer is on a network

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Code to Print to certain Printer

Thanks Ron, helpful as always


"Ron de Bruin" wrote in message
...
Hi John

With VBA you can change the ActivePrinter and print the sheet.
And set it back to your default

You can change the ActivePrinter to the printer you want like this
Application.ActivePrinter = "hp officejet k series on Ne00:"

To know the names of your pinters
Change to it in the ctrl P dialog (Cancel after you choose the printer )
and run this so you know the name

Sub nameprinter()
MsgBox Application.ActivePrinter
End Sub

If you print with code then look also at Printout in the VBA help
You can fill in the name of the printer in the arguments


--
Regards Ron de Bruin
http://www.rondebruin.nl


"John" wrote in message

...
Is it possible via code to print to a certain printer?

The relevant printer is on a network

Thanks






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print to Excel instead of Printer? Jeremy Excel Discussion (Misc queries) 2 April 22nd 23 02:07 AM
Unable to Print to Printer Bob Excel Discussion (Misc queries) 3 December 5th 07 09:37 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
I cannot get my printer to print any information ANDIAMO New Users to Excel 1 January 9th 07 07:21 AM
how can I get my printer to print in grayscale ? FRUSTRATED Excel Discussion (Misc queries) 1 November 23rd 05 03:21 AM


All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"