Dimondwoof
Programmer
Does anyone know how to set the default printer in a VB6 app in Windows 2000? I've tried the Set Printer command from the printers collection and that doesn't seem to do a thing. Here's my code:
For Each X In Printers
If X.DeviceName = "Certificate Printer" Then
Msgbox "Found Printer"
' Set printer as system default.
Set Printer = X
' Stop looking for a printer.
Exit For
End If
Next
I get the "Found Printer" dialog, but the default printer is never set. Any ideas?
I would prefer NOT to set the printer in Windows, since this is a specialized printer for printing special card stock and nothing else in Windows (or this program for that matter) prints to this printer. But if that is the only solution, I could live with it.
For Each X In Printers
If X.DeviceName = "Certificate Printer" Then
Msgbox "Found Printer"
' Set printer as system default.
Set Printer = X
' Stop looking for a printer.
Exit For
End If
Next
I get the "Found Printer" dialog, but the default printer is never set. Any ideas?
I would prefer NOT to set the printer in Windows, since this is a specialized printer for printing special card stock and nothing else in Windows (or this program for that matter) prints to this printer. But if that is the only solution, I could live with it.