473,396 Members | 1,884 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.

Automate printing of each record in a specific filename

I am very frustrated after searching for three days. My problem seems
to be so hard that no one really had an answer for it. I have seen
postings with similar problem but they were either ignored or the
codes/ direction didn't work.

I would extremely appreciate for someone who can help me. I have more
than 20,000 records for which I created a report. My goal is to print
each page of the report into seperate PDF files. I want to suppress the
"Save As" dialog and force Acrobat to use a file name specified in a
record of the ID field.

I could make Access to print each page into PDF but the "Save As
dialog" box always popups and ask me to input a name. Since I have so
many records, I can't name them individually. Could you help me to
suppress the "Save As" dialog and force Acrobat to use a file name
specified in a record of the ID field.

Here is my code to print each page into PDF:

Private Sub sepPrint_Click()

Dim db As Database
Dim recordNo As Integer
Set db = CurrentDb

DoCmd.OpenReport "ReportName", acPreview, "QueryName", ""
recordNo = 1

Do While recordNo < 20001

DoCmd.PrintOut acPages, recordNo, recordNo, acHigh, 1, False
recordNo = recordNo + 1

Loop

End Sub

This website appears to be a good help but I have difficulty to convert
it into Access:

http://www.planetpdf.com/mainpage.asp?webpageid=762

I also found something that uses
shellexecute Me.hwnd,"print",filename,"",0,sw_shownormal
This code doesn't really work. Also, I would then have problems to
print each page of the report into PDF seperately.

I am thanking the person who could help me further. I am really stuck.

Mili
Mg****@norus.jnj.com

Nov 13 '05 #1
1 2032
On 30 Mar 2005 08:32:55 -0800, ch******@gmail.com wrote:

......

I would extremely appreciate for someone who can help me. I have more
than 20,000 records for which I created a report. My goal is to print
each page of the report into seperate PDF files. I want to suppress the
"Save As" dialog and force Acrobat to use a file name specified in a
record of the ID field.


Hi
It looks as though you could use the standard edition referred to in
http://ourworld.compuserve.com/homepages/attac-cg/

The other way would be to use a freeware PDF writer (eg CutePDF) and
deal with the filename box by using sendkeys. Don't use the actual
sendkeys routine though, that can spray keystrokes to other
applications; use code which puts the keystrokes directly into the
Access applications message queue. See for example
http://www.vbaccelerator.com/home/VB...PI/article.asp

David

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris | last post by:
Hello all, I wish to automate printing of PDF documents in a C# application. Is there an Adobe .net object? I tried to create a reference to the COM Object Adobe Type Library, but I get error...
3
by: Brad Burke | last post by:
From a windows .Net app, I need to 1) check if MSAccess is already open to a certain Access application. If so, then open a form and find a certain record. 2) If not open, then open MSAccess and...
4
by: Jeff Harbin | last post by:
I've got an ACCESS 2000 application that I'm developing. One of the outputs of this app will be to generate a series of 'jobs' which corresponds to a record in the database. Each record will be...
4
by: Sami | last post by:
I hope someone will tell me how to do this without having to do any VB as I know nothing in that area. I am a rank beginner in using Access. I have created a database consisting of student...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
2
by: Phil Latio | last post by:
We have despatch process which kicks out picking information into text files at hourly intervals. The text files are named sequentially by process; 'ABC.txt', 'ABC01.txt', 'ABC02.txt' for one...
1
by: Liam.M | last post by:
I currently HAVE a form...a "Summary List" it could be called...which is a contineous form...AND on this form are "Four fields" from EVERY record (each on their own line) so to seak...like a...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
4
by: Chris Seymour | last post by:
Hi All, I am working on a python script for my colleague that will walk a directory and search in the different files for a specific string. These pieces I am able to do. What my colleague wants...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.