I have the following code to select a printer which is part of the printer collection in the settings/printers on my NT machine,
Regardless of which printer I select the output always goes to the windows default printer in settings/printers.
Is there a vb5 conflict with windows NT or is it a vb problem?
Dim OrigPrinter As String
Dim SelectedPrinter As String
Dim X As Printer
SelectedPrinter = "\\EDP1\EDPHP550"
OrigPrinter = Printer.DeviceName
'Set the printer to the selected printer
For Each X In Printers
Debug.Print Chr$(34) & X.DeviceName & Chr$(34)
If X.DeviceName = SelectedPrinter Then
' YES WE DO GET HERE!
Set Printer = X
' Prints on Default printer, why?
Any comments or answer appreciated.