Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing EXCEL tables with sophisticated HP Printers such as the D | Excel Discussion (Misc queries) | |||
Changed printers and now Pictures float when printing. | Excel Discussion (Misc queries) | |||
Excel 2007 Margins Cut Off Printing to Non-Physical Printers | Excel Discussion (Misc queries) | |||
Printing on different printers (makes/models etc) | Excel Discussion (Misc queries) | |||
formating issues when printing using different printers | Setting up and Configuration of Excel |