Printer.Print on non-default printer 
Author Message
 Printer.Print on non-default printer

This is probably a frequently asked question but i can't find the answer
anywhere else.

How do i print to the printer i've selected in the common dialog without
setting it to default ?
Printer.print always prints on my default printer(laser) but i want it to
print on specials forms(dot matrix)

Any ideas, sites to look at ??

TIA



Tue, 29 Jun 2004 19:06:24 GMT  
 Printer.Print on non-default printer
Here is a sample:

Dim MyPrinter As Printer

For Each MyPrinter In Printers

    If MyPrinter.DeviceName = "Your Printer's Name" Then

        Set Printer = MyPrinter

        Printer.Print "test"
    End If

Next

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Fri, 02 Jul 2004 21:56:46 GMT  
 Printer.Print on non-default printer
How do i get the device name from the Common Dialog box ??

I can't hard code it because i can't be sure of the printers name !!

Ste..



Quote:
> Here is a sample:

> Dim MyPrinter As Printer

> For Each MyPrinter In Printers

>     If MyPrinter.DeviceName = "Your Printer's Name" Then

>         Set Printer = MyPrinter

>         Printer.Print "test"
>     End If

> Next

> Luke

> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)



Fri, 02 Jul 2004 23:35:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

2. printer default to non-default printer

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

4. Printing to non-default printer

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

6. Printing to non-default printer

7. printing to non-default printer

8. Help w/ printing to non-default printer

9. Print on a non-default printer

10. Print to non-default printer

11. Macro that selects printer and prints doc also changes default printer

12. Printing to a printer that is NOT the default printer

 

 
Powered by phpBB® Forum Software