A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Send Email with File Attachment



 
 
Thread Tools Display Modes
  #11  
Old June 28th, 2007, 04:48 PM posted to microsoft.public.access
Peter Hibbs
external usenet poster
 
Posts: 871
Default Send Email with File Attachment

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.

On Thu, 28 Jun 2007 09:54:32 -0400, "JeffG"
wrote:

Tom -

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. In your code, it looks
like it's using wildcards to send the files. I want to send a single file.
The process map would be like:

1. Generate the PDF using ReportToPDF
2. Programmatically set up an email message with that PDF as the
attachment, with some items filled in already (i.e. SendTo, Message Body,
and attachment).
3. Leave no remnants of the snp or pdf files.

Like I said, I have both the ReportToPDF and your SendMail modules in my
database, but can't figure out how to get them to do what I want.

Thanks.

Jeff

"Tom Wickerath" AOS168b AT comcast DOT net wrote in message
news
Hi Jeff,

Take a look at my first reply in this thread, dated 6/24. I provided a
link
to a zipped Word document, that I call "Access Links.doc". There is a
procedure shown on page 17 of this document.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/ex...tributors.html
__________________________________________

"JeffG" wrote:

Tom -

You reference your code or Arvin's code to send the PDF file in
Outlook....can you elaborate? I've been trying to find out how to send a
PDF after using Lebans ReportToPDF, but have been unsuccessful. I want
to
automate the whole process, with no user intervention or having to attach
a
file in an email message.

Thanks.

Jeff G


  #12  
Old June 29th, 2007, 05:42 AM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default 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  
Old June 29th, 2007, 05:52 AM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.