Results 1 to 2 of 2

Thread: Choosing a printer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 1999
    Location
    Ikaalinen, Finland
    Posts
    26
    Hello gurus!

    I was wondering is it possible to choose the used printer directly by code without any dialog boxes etc? If it is, could someone give a little code how...

    Also, is there any way to select an orientation of the printer via code? Also, I'd like to know how to modify the scaling... I have tried Printer.Orientation and Printer.Zoom -methods but they didn't work.

    .................................
    Ville Mattila
    Ikaalinen, Finland
    [email protected]

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Check out the Printer object. You can provide the Combobox (or Listbox) with available printers:
    Code:
    Dim prn As Printer
    
    For Each prn In Printers
        Combo1.AddItem prn.DeviceName
    Next
    Then after the user selects the printer, you can use it to print:
    Code:
    Dim prn As Printer
    
    For Each prn In Printers
        If prn.DeviceName = Combo1.Text Then
            prn.Print "This is a printer demo"
            prn.EndDoc
            Exit For
        End If 
    Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width