Concerning the Printer and the Printers collection
I am going to use the following bit of code to set the default printer for my app.
VB Code:
Dim X as Printer
For Each X In Printers
If X.DeviceName = "MyPrinter" Then
Set Printer = X
Exit For
End If
Next X
If X.DeviceName <> "MyPrinter" Then
MsgBox "MyPrinter is not installed!"
Exit Sub
End If
Before I do though, does anyone know if there is any possibility for this to fail (excluding of course, the absence of MyPrinter on the system). In other words, does anyone believe that this is not a fool-proof way of setting the default printer for an app?
If you know of any issues, please let me know.