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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report to Adobe/Email Problem

Status
Not open for further replies.

halfbarrel

Programmer
Jun 12, 2002
44
US
Hello,
I'm working on coverting an access report to a pdf and then I would like to email it. I set report's printer to the Adobe Writer, and open the report to print. My problem is, I believe that the report is submitted to the Adobe printer queue and then the next line of code to email the pdf kicks off before the pdf is generated.

I begain looking into the pdfdistiller object and the FileToPdf function, but this takes a postscript input file.

Does anyone know of a way to convert an access query or report to a postscript file or to make access wait until the pdf is generated to try to email it?
Thanks for any help,

Chris.
 
if it any help i have some code to print a report to a pdf file so you can program the path of the file.

Then there should be some code you can find to pick up this path/filename to be able to email it on...

Let me know if you want it, i find it very useful when i'm printing individual records to pdf
 
M8KWR,
I can print it currently to a pdf, but I need to be able to email it right away too. The problem is that when the report is sent to the spooler it returns control to the vba module and the code that I have to email the job blows because it doesn't see the file yet(the pdf spooler hasn't generated it yet). Let me know if you have any other suggestions.
Thanks,

Chris.
 
are you using printing to the distiller or the PDFwriter.

The distiller seems to me to take a lot longer to process the file then the PDFwriter.

I always use the PDFWriter as I have had issue in the past with the distiller.

 
Hi

Why not put a loop in you code to wait until the file is found (ie created)

eg something like

Do Until Dir("path\fileofyoupdf") <> ""
Loop
' here put code to Email the file as attachment

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top