Printing a report


Posted by Jonathan on April 23, 2001 7:31 AM

What would be the best way to have a report print to a printer that is not your default printer? I want to add a line of code that after the report has ran and been formatted etc, that it will print out to the printer of the supervisor it is for. Help?



Posted by Dax on April 23, 2001 10:21 AM

Hi,
The code you need is very simple. You need to know the name of your supervisors printer which you can get from the Print dialog box. Say your supervisors printer is called Printer2 and your printer is called Printer1 something like this will work:-

Application.ActivePrinter="Printer2"
ActiveSheet.PrintOut
Application.ActivePrinter="Printer1"

Hope this helps,
Dax.