Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Select printer in code

Is there a way to see the available printers and select the desired printer in code?

My problem is that I have a dozen people that need to print a certain report on 8.5 by 11. They also need to print labels on a label printer for certain items. I would like to save their time in selecting a certain printer by selecting it for them in code.

Thanks, Art

Comments

  • Termc1224Termc1224 Member Posts: 84
    : Is there a way to see the available printers and select the desired
    : printer in code?
    :
    : My problem is that I have a dozen people that need to print a
    : certain report on 8.5 by 11. They also need to print labels on a
    : label printer for certain items. I would like to save their time in
    : selecting a certain printer by selecting it for them in code.
    :
    : Thanks, Art

    Use the Common Dialog Control
    then on the Command Button which is use to change the default printer
    put this and also set the cancelerror to true of the commondialog1

    Private Sub Command1_Click()
    On Error GoTo errmess
    commondialog1.ShowPrinter
    Exit Sub
    errmess:
    If Err.Number <> 32755 Then
    MsgBox (Err.Number & ": " & Err.Description)
    End If
    End Sub

    by clicking the print, it will not print anything it will only set the default printer.

    hope this could help
    I'm the best there is,
    the best there was,
    and the best there ever will be.
    hahahahaha lolz :)
Sign In or Register to comment.