I need to always use a specific printer to print a report, so I do not need to offer the choice of printers before printing. Here is my attempt:
Private Sub Form_Load()
Dim pr As Printer
For Each pr In Printers
Debug.Print pr.DeviceName
Combo1.AddItem pr.DeviceName
Next pr
Combo1.Text = Printer.DeviceName
Set pr = Printers(0) 'doesn't work
rptUnpaid.PrintReport False
Me.Hide
End Sub
Default printer is # 1 and is needed otherwise.
Any suggestions?
Thanks,
Leo
Private Sub Form_Load()
Dim pr As Printer
For Each pr In Printers
Debug.Print pr.DeviceName
Combo1.AddItem pr.DeviceName
Next pr
Combo1.Text = Printer.DeviceName
Set pr = Printers(0) 'doesn't work
rptUnpaid.PrintReport False
Me.Hide
End Sub
Default printer is # 1 and is needed otherwise.
Any suggestions?
Thanks,
Leo