Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1746
  • Last Modified:

Combing MS Access Reports into 1 PDF file

I would like to take multiple access reports and have them append into 1 pdf file in the same directory that my database resides.  more specifically: My two reports "report1" (1 page) and "report2" (1 page) to append into a single pdf file that has 2 pages.  Can this be doen through VBA?

Thanks
0
marku24
Asked:
marku24
1 Solution
 
ste5anSenior DeveloperCommented:
Not natively. I use PDFtk - The PDF Toolkit for such simple tasks.
0
 
marku24Author Commented:
thanks but I need to do it through access.  I can't load any outside software on my machine.
0
 
LordWabbitCommented:
You can use a program like pdftk to combine two or more pdf's into one.
Then in vba you execute a shell command to run pdftk.

    Dim command As String
    command = "cmd.exe /c G:\EE\pdftk.exe G:\EE\out1.pdf G:\EE\out2.pdf cat output G:\EE\outtest.pdf"
    Shell command

Open in new window

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ste5anSenior DeveloperCommented:
As I  said: Not natively. Maybe there exists a plain VBA imlpementation of a PDF library, but I'm not aware of it. The cool about PDFtk is: it's free and must not be installed.
0
 
pdebaetsCommented:
You could create a new report and include your two reports as subreports. Then print that new report to a .pdf file.
0
 
ste5anSenior DeveloperCommented:
D'oh, good spotted pdebaets..
0
 
marku24Author Commented:
so simple.  thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now