On 2017-05-16 16:37, rafael.copquin@gmail.com wrote:
I need to generate a batch of invoices in PDF format and then send them automatically by email I’ve been exploring the web for some meaningful code but most examples are in VB
- I have a cursor with N invoices and all pertinent header data
- I want to generate N PDF files with all the invoice data and sabe
them to a designated folder 3. I need to email them, one by one, to the respective customers I know this has been done zillions of times but in my case I never did it for batches and would appreciate an example on:
- How to generate the PDF files
- How to save them in a particular folder
- How to email them
Needles to add that the solutions have to be in VFP and FREE TIA Rafael Copquin
Hi Rafael,
About 20 years ago, when I worked for KePRO, we did a mass-PDF-generation method using .PS (postscript) files and Adobe Distiller. We'd put the .PS files in a network folder, and Distiller would convert them to .PDF files. Sadly though, I can't tell you more than that as I can only recall the general idea.
If I had to do this today, I'd suggest having PDFCreator or some other add-in tool (XFRX--although that's not free, FoxyPreviewer--free and I hear good things but have not yet tried it), CutePDF, or something like that, and just do a SET PRINTER TO NAME <whatever> and then run your reports, created the PDF on the fly, and then use CDO to email them.
It'll be interested to read the other responses.
hth, --Mike