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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default printer

Status
Not open for further replies.

CoC

IS-IT--Management
Jun 26, 2002
1
GB
Hi...

i faced a problem where i need to set back the original default printer after the user change the default printer by using common dialog control.
i can get the original default printer name before the user change the selection, but how can i can change it back to the original default automatically after the user finish printing ?
i need to fix this problem urgently.....
really appreciate who can help me to overcome this problem.

Thanks thanks a lot...


rdgs.
coc
 
This should help :)

Dim printername As String 'your old printer's devicename
Dim X As Printer
For Each X In Printers
If X.DeviceName = printername Then 'find a printer that matches the devicename
Set Printer = X ' set that printer as Default
Exit For 'stop looking!
End If
Next

David Moore
dm7941@sbc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top