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