Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing printer device name with in the code...

Status
Not open for further replies.

tommy19

Programmer
Aug 23, 2001
49
US
Hi all!

I have a need to switch back and forth between a printer and a fax printer within my code. I tried:

Printer.DeviceName = "pirnter, etc"

When I compile, I get an improper use of property. Is there a way in which I can switch printers with in my vb code?

Thanks in advance!

tomm19
 
use common dialog box (from the toolbox) and place it on the form.
you may have to check the right component under Project-->Components dropdown menu if you cannot find it on your toolbox. This way, you can access the printer object. Hit F1 when the dialog box(located on your form) is highlighted. You should get some example codes from the help menu(assuming MSDN is available for you)
 

Don't forget to ...
CD.DefaultPrinter = True
Before you call the show printer method

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top