PDA

Click to See Complete Forum and Search --> : Select a printer


Tonatiuh
Jan 2nd, 2000, 04:35 AM
I have two identical printers installed in the same PC/Win98. I use this code to select the printer.


Dim prnObj as Printer
For each prnObj In Printers
if prnObj.DeviceName = "X Printer" then
Set Printer=prnObj
end if
next


This printer is attahced in a LPT2: port.
I use several printer methods but the priting job always go to printer in LPT1: (default printer).

Any idea will be deeply appreciated.

Thanks!

jritchie
Jan 4th, 2000, 09:00 AM
Have you tried using the common dialog printer selection control. Haven't had this problem on a network, but then again we just supply the common dialog in apps and allow the users to select. It sounds like even though you are changing the printer, vb is handing the print job to windows, which is using the default printer. Maybe there is a set default printer obtion somewhere in vb, or as an api call

Jennifer_R
Jan 19th, 2000, 07:06 AM
I'm having problems changing printers when using the CDL print. Do you have an example of how to use the cdl printer to set the printer the user wants?

Any help would be appreciated thanks
Jennifer