Re: Printer Object and Printer common dialog
From: YYZ (d)
Date: 11/11/04
- Next message: Ken Halter: "Re: Printer Object and Printer common dialog"
- Previous message: Saga: "Re: Trying to use CommonDialog to select a printer."
- In reply to: Jeff Johnson [MVP: VB]: "Re: Printer Object and Printer common dialog"
- Next in thread: Ken Halter: "Re: Printer Object and Printer common dialog"
- Reply: Ken Halter: "Re: Printer Object and Printer common dialog"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Nov 2004 15:18:10 -0600
"Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message
news:OZubNYAyEHA.1188@tk2msftngp13.phx.gbl...
>
> "Brian K. Sheperd" <brians.remove@remove.lesker.com> wrote in message
> news:eeqxQRAyEHA.824@TK2MSFTNGP11.phx.gbl...
>
> > How can I use the printer object (not the common dialog) to print to a
> > particular printer? I tried to use printer.devicename, but I didnt have
> > any
> > luck. I can enumerate the printers using devicename, but that was about
> > it.
>
> For Each prt In Printers
> If prt.DeviceName = strDesiredDeviceName Then
> Set Printer = prt
> Exit For
> End If
> Next
When using Crystal reports, I found that more than this was necessary, at
least on NT type machines. I had to first find the current printer, store
that name in a string, set the NEW printer to the default printer, print,
then restore the default printer.
I used some code from VBnet to accomplish this. If anyone needs it I can
post it, but it's over 100 lines so I won't do it unless asked.
Matt
- Next message: Ken Halter: "Re: Printer Object and Printer common dialog"
- Previous message: Saga: "Re: Trying to use CommonDialog to select a printer."
- In reply to: Jeff Johnson [MVP: VB]: "Re: Printer Object and Printer common dialog"
- Next in thread: Ken Halter: "Re: Printer Object and Printer common dialog"
- Reply: Ken Halter: "Re: Printer Object and Printer common dialog"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|