![]() |
printing to multiple printers
i want to print the same Activesheet to two different printers on our network
but am unable to figure out the code. please help if this is possible |
printing to multiple printers
You would use Appliction.ActivePrinter to designate where the printout goes.
You can manually select a printer. then go to the vbe and the immediate window and do ? application.ActivePrinter <cr then go back and change to the other printer and repeat the immediate window query. This will give you the strings you need to provide to the activeprinter then construct a macro that does the printing and assigning. -- Regards, Tom Ogilvy "gkm107" wrote in message ... i want to print the same Activesheet to two different printers on our network but am unable to figure out the code. please help if this is possible |
printing to multiple printers
gkm107 wrote:
i want to print the same Activesheet to two different printers on our network but am unable to figure out the code. please help if this is possible Dear gkm107, This is so easy you'll laugh. First, a sample from my own computer: Sub PrintToBothPrinters() Application.ActivePrinter = "PaperPort Black & White Image on Ne01:" ActiveWindow.SelectedSheets.PrintOut Application.ActivePrinter = "NEC SuperScript 870 on LPT1:" ActiveWindow.SelectedSheets.PrintOut End Sub The best thing is probably to record yourself switching and printing to each printer. Look for the lines that reference the name of the printer, using the code from above as an example. Since recording the macro will create a code module automatically, all you'll need to do then is to delete the huge amount of extraneous code that your recording will generate, and end up with four lines similar to above. You can then assign the macro to a button, or just run it from the Tools/Macro menu. If you experience some screen flicker or flashing as it changes printers, add the two extra lines: Sub PrintToBothPrinters() Application.ScreenUpdating = False Application.ActivePrinter = "PaperPort Black & White Image on Ne01:" ActiveWindow.SelectedSheets.PrintOut Application.ActivePrinter = "NEC SuperScript 870 on LPT1:" ActiveWindow.SelectedSheets.PrintOut Application.ScreenUpdating = True End Sub Good Luck! Mark |
All times are GMT +1. The time now is 10:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com