auto set printer copycount

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    auto set printer copycount

    I've been printing x copies of a pdf by looping x times and calling the .PrintPages method of an Acrobat object. I'd like to call .PrintPages 1 time and let the printer itself handle the multiple copies. The code below is not working; I still get one copy no matter what. Can anyone tell me where my problem is?

    I'm also getting only one copy of the Access report that is printing prior to each pdf print.

    Thanks,
    Jim

    Code:
    Dim prtDefault As Printer ' Object
    For Each prtDefault In Application.Printers
        If prtDefault.DeviceName = strSelectedPrinter Then
            Exit For
        Else
        End If
    Next
    Set Printer = prtDefault
    Printer.Copies = rs![Number_Printed]
                prtDefault.Copies = rs![Number_Printed] ' set the printer copy count to# of copies we need of this pdf
                 DoCmd.OpenReport strSelectedBuckSlipReport, acViewNormal, , "[T & C_Printed]='" & rs![T & C_Printed] & "'"
                           
    bOK = AcroExchAVDoc.PrintPages(0, intNumPages - 1, 3, False, False)
                
          End If
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    look at:
    DoCmd.SelectObj ect
    DoCmd.PrintOut
    in the VBA help [F1]
    I don't remember the entire syntax and I'm at home with the W&Ks or I'd look it up... gota go get dinner ;-)

    Comment

    Working...