11-15-2003, 08:35 AM
I have searched the forum for information on this subject and I did find a few threads about it - but the answers were tied up with more complex things the questioners were trying to do and I havent been able to separate what I need from the answers, so I'll ask:
I have 2 printers, one called Printer1, the other Printer2. I have two buttons on a form, the idea is press one and the information will be printered by Printer1, or press 2 and likewise the info goes to Printer2.
Could anyone enlighten me about the simplest way to do this.
11-15-2003, 08:57 AM
11-15-2003, 08:59 AM
I use componentone VSPrinter control to print(Download a sample component from componentone.com)
This works for me
VSPrinter1.Device = "CopyRemChqPrt"
VSPrinter1.Device = "CopyRemChqPrt1"
11-15-2003, 09:40 AM
Thank You to those who have provided possible answers to my question. I perhaps should clarify a bit. I'm not actually trying to change the default printer. The information under the Microsoft link is about calling all the printers that you have attached and allowing the user to choose the default. In the situation I find here, I know which printer goes with which operation. If I put a commondialog on I could let them choose the printer they wanted that way, but thats too timeconsuming for the situation and the people would get it wrong. I'm really looking for a way where the correct printer for the operation is specified in the print code. Ie Print this using that printer
11-15-2003, 09:46 AM
That code I gave you the link to will do that. Simply change the default printer to the printer you want and print. Then change it back if you don't want the default printer changed. It shows how to do all that.
11-15-2003, 10:57 AM
I can see that indeed that code would change the default printer which would result in print job going to the new defualt. But -
Well, I'll try a new question, sort of:
Is there a way to send a print job to a printer that is not the default printer (and with out changing the default printer) without using a commondialog. I have seen similar questions here and it looks like
Private Sub Command1_Click
Dim Printer1 As Printer
Dim Printer2 As Printer
Set Printer = Printer2
Now if Printer1 happens to be the default printer (and without changing it as default) would this print job go to Printer2. If it doesnt is there another way of achieving this in a similar way specifying the printer you want without changing the default