Help needed in sending email from Access.

T

Terry DeJournett

I have a daily report that I need to send to a group of people. I have
created a macro in Access and have used the Send Object action to send this
report. It works fine, but it sends the report as an attachment.

Does anyone know of a way to actually embed this report into the email
document so the recipient does not have to actually open the email and then
open the attachment?

Thanks,
Terry
 
N

Niniel

If people don't open the mail, then they can't read it.

I suspect what you are talking about is the preview feature... There, it
depends on the mail client and the type of attachment. Mozilla Thunderbird,
for instance, does show pictures in preview that were attached. It doesn't do
the same for PDF files though, or Word documents, or most other files.
So unless the recipient's e-mail client has an Access preview filter - and I
am not certain those even exist - I don't think there's anything you can do.
Unless maybe you can turn your report into a picture file. Or an HTML file.
Or even plain text if you don't have graphical elements in your report.
Most, if not all, modern e-mail programs can show those file types in
preview without you having to click on the attachment.

Of course there may be other, better ways to address your problem, but this
is all I can think of.
 
J

Jeff C

Yes, you can put a report in the message of an outlook email but, this took
me a while to get working right. This is the onclick event. You will need
to adjust your report to that it looks right.


DoCmd.OutputTo acOutputReport, "Name of report", acFormatRTF,
"fullpathofreport.rtf"

Dim wdApp As Word.Application
Dim doc As Word.Document
Dim Report As MailItem

Set wdApp = New Word.Application
Set doc = wdApp.Documents.Open("fullpathofreport.rtf")
txt = InputBox("Add any comments or message.", "Input Box For Email
Comments.")
doc.MailEnvelope.Introduction = txt
Set Report = doc.MailEnvelope.Item

Report.To = "emailaddress"
Report.Subject = "whateveryouwant"
Report.Send

wdApp.Quit False
Set doc = Nothing
Set wdApp = Nothing
 
R

Ron Weaver

Jeff
I referenced Microsoft Office 11 and Microsoft Outlook 10
Now it stops at 'txt = InputBox("Please Check your order carefully.", "Input
Box For Email Comments.")' with txt= highlighted. It says "Variable not
defined" again. I don't know what to look for?? Help.
 
J

Jeff C

You probably are using incorrect syntax for the inputbox function.

You should look up "inputbox" in the visual basic help file to read about
how you use it and to see what the correct syntax is.

My guess is that you may not need it at all anyway so you could comment the
line out by placing an astorick in fron of the line.

When you are in Word and have a document open, if you click File, Send To,
it places the doucment in the message of an Outlook e-mail, the email opens
for editing with the cursor in an area called Intruduction.

If you do not need anything in this area comment out the txt = line and also
comment out the line following that, doc.mailEnvelop.introduction=txt.

Good Luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top