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
  #1  
Old June 24th, 2007, 12:55 PM posted to microsoft.public.access
Samuel
external usenet poster
 
Posts: 95
Default Send Email with File Attachment

Hi

Is it possible to send an email with file attachments using the SendObject
Action? Alternatively is there another method to do that?

Thank you,
Samuel


  #2  
Old June 24th, 2007, 01:44 PM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Send Email with File Attachment

Hi Samuel,

It is certainly possible to send (1) attachment using SendObject, as long as
the attachment you want to send is an object (table, query, etc.) within your
database.

If you are using Outlook (not Outlook Express), you can use code shown on
page 17 of my "Access Links.doc" Word document. You are welcome to download a
zipped copy from he

http://home.comcast.net/~tutorme2/sa...ccesslinks.zip

Access MVP Arvin Meyer has some code samples available for Outlook as well:

http://www.datastrat.com/Code1.html
(See "OutlookEmail.txt" and "MultipleMail.txt")


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

"Samuel" wrote:

Hi

Is it possible to send an email with file attachments using the SendObject
Action? Alternatively is there another method to do that?

Thank you,
Samuel

  #3  
Old June 24th, 2007, 03:09 PM posted to microsoft.public.access
Samuel
external usenet poster
 
Posts: 95
Default Send Email with File Attachment

All I want is to send a report with a picture but the picture disappears
when I use the email option



"Tom Wickerath" AOS168b AT comcast DOT net wrote in message
...
Hi Samuel,

It is certainly possible to send (1) attachment using SendObject, as long
as
the attachment you want to send is an object (table, query, etc.) within
your
database.

If you are using Outlook (not Outlook Express), you can use code shown on
page 17 of my "Access Links.doc" Word document. You are welcome to
download a
zipped copy from he

http://home.comcast.net/~tutorme2/sa...ccesslinks.zip

Access MVP Arvin Meyer has some code samples available for Outlook as
well:

http://www.datastrat.com/Code1.html
(See "OutlookEmail.txt" and "MultipleMail.txt")


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

"Samuel" wrote:

Hi

Is it possible to send an email with file attachments using the
SendObject
Action? Alternatively is there another method to do that?

Thank you,
Samuel



  #4  
Old June 24th, 2007, 03:21 PM posted to microsoft.public.access
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Send Email with File Attachment

Samuel wrote:
All I want is to send a report with a picture but the picture
disappears when I use the email option


The only export format that supports graphics is the Snapshot format and the new
PDF option in Access2007.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #5  
Old June 24th, 2007, 03:34 PM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Send Email with File Attachment

Hi Samuel,

If you can send the attachment in the Microsoft Access Snapshot (*.snp) file
format, then you should be home free. However, this would require that the
receipient has the free viewer utility installed on their Windows-based PC.
Here is an example of how to do this:

DoCmd.SendObject acReport, "Report Name", OutputFormat:=acFormatSNP, _
To:="Email Address", Subject:="Email Subject", EditMessage:=True

This thread, from Dec., 2004, gives more details:
http://groups.google.com/group/micro...b254d13a623323

I think you can also programmatically export to a .PDF file, and then use
code for Outlook to send this file. You can try using Stephen Leban's Report
to PDF method to create the .PDF file, and then use my code (or Arvin's code)
to send the file using Outlook (not Outlook Express).

Report to PDF
http://www.lebans.com/reporttopdf.htm


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

"Samuel" wrote:

All I want is to send a report with a picture but the picture disappears
when I use the email option

  #6  
Old June 25th, 2007, 04:01 AM posted to microsoft.public.access
tina
external usenet poster
 
Posts: 1,997
Default Send Email with File Attachment

MVP Tom Wickerath's advice and suggestions stand or fall on their own
merits, as do those of everyone else who posts replies in these newsgroups.
the exception, of course, are personal attacks - which do not point out
flaws in the posted advice or suggestions, and offer valid corrections or
fixes or alternatives, but are merely unpleasant to read. in those cases, my
suggestion is to block the sender, so as to avoid wasting time reading these
types of posts.

go and talk to someone that knows SQL Server, kids


my advice is that this suggestion is not useful, because this newsgroup is
devoted to MS Access. so one must assume that the post-er is using Access,
but not in conjunction with SQL server - or that the origin of the data has
no bearing on the question - unless s/he specifically includes it in the
post...and indeed the original and subsequent posts in this thread do not
include SQL server in any way that i can see.

hth


  #7  
Old June 27th, 2007, 01:51 PM posted to microsoft.public.access
JeffG
external usenet poster
 
Posts: 10
Default Send Email with File Attachment

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

"Tom Wickerath" AOS168b AT comcast DOT net wrote in message
...
Hi Samuel,

If you can send the attachment in the Microsoft Access Snapshot (*.snp)
file
format, then you should be home free. However, this would require that the
receipient has the free viewer utility installed on their Windows-based
PC.
Here is an example of how to do this:

DoCmd.SendObject acReport, "Report Name", OutputFormat:=acFormatSNP, _
To:="Email Address", Subject:="Email Subject", EditMessage:=True

This thread, from Dec., 2004, gives more details:
http://groups.google.com/group/micro...b254d13a623323

I think you can also programmatically export to a .PDF file, and then use
code for Outlook to send this file. You can try using Stephen Leban's
Report
to PDF method to create the .PDF file, and then use my code (or Arvin's
code)
to send the file using Outlook (not Outlook Express).

Report to PDF
http://www.lebans.com/reporttopdf.htm


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

"Samuel" wrote:

All I want is to send a report with a picture but the picture disappears
when I use the email option



  #8  
Old June 27th, 2007, 07:24 PM posted to microsoft.public.access
Tony Toews [MVP]
external usenet poster
 
Posts: 3,776
Default Send Email with File Attachment

"JeffG" wrote:

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.


Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
  #9  
Old June 27th, 2007, 09:50 PM posted to microsoft.public.access
Tom Wickerath
external usenet poster
 
Posts: 3,914
Default Send Email with File Attachment

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

  #10  
Old June 28th, 2007, 02:54 PM posted to microsoft.public.access
JeffG
external usenet poster
 
Posts: 10
Default Send Email with File Attachment

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



 




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 05:31 AM.


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