Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a number of PDF's (in a report or other approach)

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
Hello All,

I have an invoice table tbl_Invoice which has the following:

Inv_Id (unique ID)
Inv_Name (a client’s name)
Inv_Path (the file path of the scanned PDF invoice)

The table will contain a number of invoices for each client.

I would like to be able to send the client a single email attaching the invoices.

The email part of it I can do fine, it’s just trying to get the pdf in a single file.

At present I send a single email with single invoice attached - this works OK, but when clients maybe have 30 or so invoices scans it means them getting 30 or so emails.

To be clear, the invoices are ones that have been paid via our company for the client so they are stored as individual scans.

I was hoping to create a report which would display each PDF, but as far as I can see there is no way to do this (the web viewer control will only work on a single form).

Can anyone give some advice - or a different approach?

Many thanks Mark












 
Options...

1) Attach multiple files to the e-mails
2) Merge the PDF files then e-mail them
3) Make a zip archive of the files

You are claiming number 2 is right. We each have adobe pro so we can automate it and use it to merge documents via the API. This should be easy code to find but at the same time Adobe Pro seats are not cheap.

I have used an open source Print to PDF program that allows you to collect, merge and finalize your prints... It is called PDF Creator. You'd have to set registry keys to put it in collect mode, change it back to finalize the last file and print each pdf to that soft printer (probably set the default printer). I also think there are command line tools that you could use to merge the files but I don't know any off the top of my head or if there are free ones.

You can zip files with VBA using Windows... I remember it gave me some trouble to figure it out, alas I don't have that code now.
 
Zipping with VBA is pretty straightforward, e.g. my code in thread222-1302498
 
I don't know any off the top of my head or if there are free ones.

Regarding the PDF portion. PDFtkServer is a free command line tool for merging, splitting, bookmarking, etc. pdf files. It does not require changing settings to default printers and it doesn't need Acrobat. Simply run it in vba code using shell command. If you need code example, I could provide a sample.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top