printer default to non-default printer 
Author Message
 printer default to non-default printer

My computer defaults to a laser printer.
I am writing a program that is intended solely for impact printers.

How can I alter the Printer.DeviceName before calling ShowPrinter?
Or, maybe a better question is, can the printer devicename be altered
without using a printdialog box and without using cumbersome Windows
API calls?

My defined printers are:

        DEVICENAME              DRIVERNAME
        ===========             ===========
        LASER                   HP Laserjet III
        DOTMATRIX               IBM Proprinter

My code doesn't work, please don't step on me too hard, I'm a newbie.

        ' Invalid property assignment.
        Printer.DeviceName = "DOTMATRIX"
        ShowPrinter Me

The idea was to make this program have a seperate default printer than
that of all the other programs.  Perhaps later, I will add code to use
the printer that was used previously, but for now, I would just like
to hardcode it to get it up and running.

Any ideas?



Sat, 26 Jul 2003 06:48:29 GMT  
 printer default to non-default printer
You can easily loop through the installed printers and select the one you
want... I have an example of this on my site if you're interested... it just
loads all installed printers into a combo box and lets you select one...

Once selected, you could write the value to the registry (if you want) so
you don't need to select it each time.

Selecting a Printer
http://khalter.8k.com/Programs.html


Quote:

> My computer defaults to a laser printer.
> I am writing a program that is intended solely for impact printers.

> How can I alter the Printer.DeviceName before calling ShowPrinter?
> Or, maybe a better question is, can the printer devicename be altered
> without using a printdialog box and without using cumbersome Windows
> API calls?

> My defined printers are:

> DEVICENAME DRIVERNAME
> =========== ===========
> LASER HP Laserjet III
> DOTMATRIX IBM Proprinter

> My code doesn't work, please don't step on me too hard, I'm a newbie.

> ' Invalid property assignment.
> Printer.DeviceName = "DOTMATRIX"
> ShowPrinter Me

> The idea was to make this program have a seperate default printer than
> that of all the other programs.  Perhaps later, I will add code to use
> the printer that was used previously, but for now, I would just like
> to hardcode it to get it up and running.

> Any ideas?



Sat, 26 Jul 2003 07:18:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Q: Printing report on non-default printer w/o user selecting printer

2. Printer.Print on non-default printer

3. Macro to change default printer and then restore original default printer settin

4. Changing Printers property reset printer to Windows default printer

5. How selecting a (non-default) printer for printing a report

6. Printing to non-default printer

7. How do I Print to non-default printer in VB5

8. Printing to non-default printer

9. Non-Default Printer

10. printing to non-default printer

11. Help w/ printing to non-default printer

12. I m trying to send ASCII string(s) to non-default printer - problem

 

 
Powered by phpBB® Forum Software