473,396 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

auto set printer copycount

1,271 Expert 1GB
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
1 1679
zmbd
5,501 Expert Mod 4TB
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

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

Similar topics

5
by: Ken | last post by:
Hello Everyone, I think that there is no way to add a network printer in .Net. I have tried ,as an alternative, using windows API AddPrinter. This was not successful. Does anybody have a...
5
by: Gordon Truslove | last post by:
Has anybody managed to get GetPrinter and PRINER_INFO_2 to work? I would like to retrieve the printer status.
0
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small. ...
3
by: Gordon Truslove | last post by:
I've been trying to get the printer status using GetPrinter and Printer_Info_2 I'm getting closer, but it still fails. Error 122 - The data area passed to a system call is too small....
6
by: notregister | last post by:
hi, i have been trying to send a printer-ready data to an unknown printer to print. the reason why the printer is unknown is that i do no wish installed any printer driver. so at the end my...
11
by: pamelafluente | last post by:
I am doing my own PrintDialog, and have placed there a combo with the printer names, as in the PrintDialog provided by VB.NET. Here is the question: how do I open the native windows printer...
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
13
by: Mark Rae | last post by:
Hi, I have used the code below to return the default printer in 32-bit WinXP Pro, but now that I am running 64-bit Vista Business I'm getting an error: using System.Drawing.Printing; using...
9
by: id10t error | last post by:
Hello, I am going to be using a Symbol WT4090 to scan items. I need to printer a tag from the Zebra ql320 plus. I am trying to do this is Visual basic 2005. Does anyone know and good site to...
1
by: =?Utf-8?B?T21lZ2FTcXVhcmVk?= | last post by:
have customized PageSetup and Print dialogs that emulate the standard dialogs. I would like to be able to open the "Printer Preferences" dialog by clicking a button (just like can be done on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.