Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'Printer property' (2003 SP1)

    I'm considering various outputs (for sending a report to customers) & one possible is using the "Microsoft Document Image Writer". Clearly to use this, a user must select it. I just wondered if it possible to do this using the 'printer property'.

    The help file was a bit vague (see below). Does the 'Set Application Printer' line number the available printers, or is it something else, therefore needing further information?



    The following example makes the first printer in the Printers collection the default printer for the system, and then reports its name, driver information, and port information.

    Dim prtDefault As Printer

    Set Application.Printer = Application.Printers(0)

    Set prtDefault = Application.Printer

    With prtDefault
    MsgBox "Device name: " & .DeviceName & vbCr _
    & "Driver name: " & .DriverName & vbCr _
    & "Port: " & .Port
    End With

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 'Printer property' (2003 SP1)

    The line

    Set Application.Printer = Application.Printers(0)

    specifies that Access uses the first in the list of printers (counting starts at 0, not at 1). To specify Microsoft Document Image Writer, try

    Set Application.Printer = Application.Printers("Microsoft Document Image Writer")

Posting Permissions

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