hi all,
how can i set a printer as standardprinter if i have a printercontrol (dim xyz as printer) ???
cu
kreuzfeld
Printable View
hi all,
how can i set a printer as standardprinter if i have a printercontrol (dim xyz as printer) ???
cu
kreuzfeld
Change default printer:
NT & Win2K:
http://www.mvps.org/vbnet/code/system/defprinternt.htm
A class module for Win9X & nt is attached
To set a printer as the default printer, all you have to do is use the Printer object in VB and set it to the printer you like.
For e.g. if you have a printer named HP, then you could code it like this:
Set Printer = Printers("HP")
Of course it does not have error checking and all, but that's how you can set the HP to be the default printer.
.
Doesn't work reliably for some older VB. See MSDN article
http://support.microsoft.com/default...;EN-US;q167735
This is the general suggested way to set the default printer, not just for the VB session, changes the default printer, not what VB thinks is the default printer for right now.
http://support.microsoft.com/default...;en-us;Q266767