Hi,
I am learing VB6 and neet help with printers
How can I make my VB6 program change the default printer to the one it wants and change it back again when it's finished
Can this be done with code and not to use the Printer Dialog Box.
------------------------------------------------------
Dim P As Printer, OldP as string
OldP = Printer.DeviceName
For Each P In Printers
If P.DeviceName = "\\HOEK\castle" Then
Set Printer = P
Exit For
End If
Next
'do your printing here
For Each P In Printers
If P.DeviceName = OldP Then
Set Printer = P
Exit For
End If
Next
------------------------------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.