sending report through email

J

Jean-Paul

Hi,
I have a continuous form containing records after running a query..
Now I want to create a pushbutton that, when pushing, automatically
sends a report, based upon this recordset, to my boss.

Creating the report itself is no problem, but how to send it?

Should it be as an attachment, can I put everything in the mail-body?

Any help is welcome
Thanks
 
J

Jean-Paul

this is what I wrote:

DoCmd.SendObject acSendForm, "weekplanning", ,
"(e-mail address removed)", , , "testje", "voor de wim", , True

In the help file I can't find much about the acSendForm command...
Do I have to create a report first (based upon the query I use for the
continuous form)
Is my syntax correct or not... any suggestions

Thanks
 
F

FMS Development Team

Hi Jean-Paul,

Our Total Access Emailer program may be able to help you.

Total Access Emailer is an Access add-in that lets you send
personalized emails to everyone in your list. From a table or query,
it can send emails to every email address and customize the message
and subject with field values from each record. I can also filter
data and reports to include that person's data in the body of the
message or attach it as a file.

In Access 2007, it can attach the Access report as a PDF file. Emails
can be in text or HTML format. You can also use the HTML output of a
report and make that the body of your message (this lets you use all
the power of Access reports to customize your entire message).

Total Access Emailer includes an interactive Wizard and a
programmatice interface for VBA developers so you can add it directly
in your code. A runtime library is available.

You can download a 30 day demo/trial version. For more info vsit
http://www.fmsinc.com/MicrosoftAccess/Email.asp

Good luck.

Luke Chung
FMS, Inc.
http://www.fmsinc.com
 
K

Kari

Jean-Paul,

I have a button with the following code to send a report via e-mail:
DoCmd.SendObject acReport, "PO Report", "PDFFormat(*.pdf)", , , , "PO-" &
[Order ID], , True

"PO Report" is the name of the report (yes you have to create the report
first--you can't send a form as a pdf).

"PO-" & [Order ID] is what goes in the subject line.

You can check the help file for SendObject to find out what all the other
parameters are.

I believe you need an add-in to send via pdf, but it's free. I don't
remember the details (it's been too long) but if you try searching on PDF in
the discussion boards you should find instructions (that's how I learned how
to do it).

I just realized that (once you have the add-in installed and the report
created) you can do the whole operation via a Macro, which might be easier
(especially if you're new to VB). Create a macro and choose SendObject as
the Action. All of the parameters will be listed at the bottom of the screen
(with descriptions) and you can fill in the ones you need.

I've never tried sending a report as anything but a pdf, so I don't know
what else works.

Hope that helps.

Kari
 
K

kemosabe

Jean-Paul,
I have reports that I send to e-mail via buttons on forms. I have set the
Format parameter to "HTML" and it puts it in the body of the e-mail. Even
have it determines the correct e-mail addresses and puts them in the header!
However, there are a couple of quirks I've come across putting the report
into the body of the e-mail.

Formatting is key because not all receivers' screens will be set up the same
to view the e-mail. The width is very important as well as the length. If
your "report" is more tha 1 page long, it creates an error when exporting to
the e-mail (apparently doesn't recognize the end-of-page). Also, if the
export to e-mail fails for some reason, it leaves an "orphan" temp file on
your computer which prohibits you from embedding future reports in e-mail as
HTML. It actually inserts it as an Excel attachment (go figure). To
resolve, you must go into your temp files and delete the "orphan" file. Hope
this helps!
 

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