If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#12
|
|||
|
|||
Send Email with File Attachment
Hi Peter,
I have no objections, and I'm pretty sure that Stephen would be fine with it too. Thank You for taking this inititive! Jeff: In your last reply, you wrote: "That's along the lines of what I want to do, but more specifically, I want to run the ReportToPDF, which generates the PDF, and send the file that was just created without actually saving it to the disk." I don't think this is possible to use the ReportToPDF functionality, without first writing the file to the hard drive, if only as a temporary copy. My code is designed to send files that can be found on the hard drive. One could add code to delete the .pdf file after having sent it, and this would probably be fairly reliable, but, if Access happened to crash for some reason after writing the file, but before the deletion code was run, then you could end up with the .pdf file remaining on the hard drive. Depending on the method that you are using for sending e-mail, you would likely end up with a copy on the hard drive anyways, in the Sent Items folder of Outlook. You might also want to look into using Win2PDF (http://win2pdf.com). It can be programmed using VBA code. Another Access MVP, who uses this product, is very happy with it. Tom Wickerath Microsoft Access MVP https://mvp.support.microsoft.com/profile/Tom http://www.access.qbuilt.com/html/ex...tributors.html __________________________________________ "Peter Hibbs" wrote: Jeff I have combined the e-mail code from Tom and the ReportToPDF code from Stephen into a single module. You can import the module into your project and then to email a report as a PDF file you can just call a single sub-routine which does everything automatically (in exactly the way you described). If you would like a copy of the code (providing Tom or Stephen do not object) just email me at OSPAM (leave off the NOSPAM bit) and I will send it on. Peter Hibbs. |
#13
|
|||
|
|||
Send Email with File Attachment
PS. Another possible solution is to use PDF Creator as it is open source and
free. http://sourceforge.net/projects/pdfcreator/ Tom Wickerath Microsoft Access MVP https://mvp.support.microsoft.com/profile/Tom http://www.access.qbuilt.com/html/ex...tributors.html |
|
Thread Tools | |
Display Modes | |
|
|