Hi I am using the common dialog to print documents, the user can select the printer which is fine. My problem is that the once the dialog is cloed then the printer that is selected is set to the dedault printer. This is the problem
In my Form_Load()
Printer.TrackDefault = True
in the method where i print I have the following:
storePrinter = Printer.DeviceName
MsgBox storePrinter
CommonDialog1.ShowPrinter
'''this is where I do the printing'''
the storeprinter returns the origional name of the default printer
after printing I have the following method to try set the default printer back to the origional default.
Sub SetPrinter()
Dim Pr As Printer
For Each Pr In Printers
If UCase(Pr.DeviceName) = UCase(storePrinter) Then
Set Printer = Pr
Exit Sub
End If
Next
End Sub
I am not sure why the default printer is not set to the origional default. Any help would be *greatly* appreciated!!
thanx in advance