Printer problems

I am trying to allow a user to select a printer to print out a crystal designer report without changing the default printer setting. The code below works great for the print job but it changes the default printer to what is selected. I tried various approaches mentioned here at dev-archive but none of them are shifting the printer back to the original default. Whats strange about this is if I put a msgbox in the code to see if the Printer object is back to the default it is but not when you then look in settings or re-open the common dialog box. Also, for some reason the Printer object has a different port designation than that which comes from the Printers collection. Only the latter will work with the SelectPrinter method. Maybe a totally different approach would be better.

Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)

UseDefault = False
On Error GoTo CancelError
CommonDialog1.CancelError = True

'needs to be True to set Printer Object
CommonDialog1.PrinterDefault = True
CommonDialog1.ShowPrinter

'get proper port designation
Dim prt As Printer
For Each prt In Printers
If prt.DeviceName = Printer.DeviceName Then
Dim a As String
Dim B As String
Dim C As String
a = prt.DriverName
B = prt.DeviceName
C = prt.Port
crxReport9.SelectPrinter a, B, C
Exit For
End If
Next

crxReport9.PrintOut False
Printer.EndDoc

'''
Restore default printer
'Need Help here.
if use Printers collection to get the original default printer and
then state Set Printer = originaldefaultprinter the Printer object
is set but not the System Printer.
''

Exit Sub

CancelError:
MsgBox "Printing Canceled"

End Sub
[1939 byte] By [masonad] at [2007-11-20 10:13:10]
# 1 Re: Printer problems
Try this instead:
dglienna at 2007-11-9 19:35:25 >
# 2 Re: Printer problems
' Copy user input from the dialog box to the properties of the selected printer.
printDlg.Copies = Printer.Copies
printDlg.Orientation = Printer.Orientation
printDlg.ColorMode = Printer.ColorMode
printDlg.Duplex = Printer.Duplex
printDlg.PaperBin = Printer.PaperBin
printDlg.PaperSize = Printer.PaperSize
printDlg.PrintQuality = Printer.PrintQuality
LesC at 2007-11-9 19:36:34 >