By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,122 Members | 1,689 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,122 IT Pros & Developers. It's quick & easy.

auto set printer copycount

Expert 100+
P: 1,221
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

Expand|Select|Wrap|Line Numbers
  1. Dim prtDefault As Printer ' Object
  2. For Each prtDefault In Application.Printers
  3.     If prtDefault.DeviceName = strSelectedPrinter Then
  4.         Exit For
  5.     Else
  6.     End If
  7. Next
  8. Set Printer = prtDefault
  9. Printer.Copies = rs![Number_Printed]
  10.             prtDefault.Copies = rs![Number_Printed] ' set the printer copy count to# of copies we need of this pdf
  11.              DoCmd.OpenReport strSelectedBuckSlipReport, acViewNormal, , "[T & C_Printed]='" & rs![T & C_Printed] & "'"
  12.  
  13. bOK = AcroExchAVDoc.PrintPages(0, intNumPages - 1, 3, False, False)
  14.  
  15.       End If
Apr 3 '12 #1
Share this Question
Share on Google+
1 Reply


zmbd
Expert Mod 5K+
P: 5,397
look at:
DoCmd.SelectObject
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 ;-)
Jul 16 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.