Selecting a printer in code - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Selecting a printer in code

apenticoffapenticoff Posts: 63Member
Can someome please tell me how I can select a printer in code?

I need to print on 8.5 by 11 for one report, and to print a label on a label printer for another report.

I would like an example of how to choose the printer in code without showing the printer dialog box.

Thanks, Art

Comments

  • apenticoffapenticoff Posts: 63Member
    : Can someome please tell me how I can select a printer in code?
    :
    : I need to print on 8.5 by 11 for one report, and to print a label on
    : a label printer for another report.
    :
    : I would like an example of how to choose the printer in code without
    : showing the printer dialog box.
    :
    : Thanks, Art
    Through trial and error (mostly error), I found the secret. Just in case someone else has this requirement, here is the code.

    Me.printdoc.PrinterSettings.PrinterName = "My Printers name"

    Hope this helps someone else out.
Sign In or Register to comment.