Export report directly to emailbody instead of an attachment?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does someone know how I can export a template directly to an Emailbody
instead an attachment like .rtf, .xls, snapshot ?
Many thanks
 
To quote one of our MVPS:

"To create a formatted document to send as an email you will need to
use VBA code to create a largish string. This string will then be
passed to the SendObject command or other method as the body of the
email. For more details including sample air code see my Tips page
on this topic at http://www.granite.ab.ca/access/email/formatted.htm.


For a page on how to print a report for a single record and how to
generate reports to attach to emails see the Emailing reports as
attachments from Microsoft Access page at
http://www.granite.ab.ca/access/email/reportsasattachments.htm" - Tony
Toews, Microsoft Access MVP
 
Thank you Daniel
The first method is responding to me.
Do you have a sample code for me of the SendObject command ?
Note : I don't like the include the template as an attachment.
thanks
Umberto
 
Look it up in the VBE Help.

You'll see an example:
Basic Synthax
DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject,
MessageText, EditMessage, TemplateFile)

Functional Example
DoCmd.SendObject acSendTable, "Employees", acFormatXLS, "Nancy Davolio;
Andrew Fuller", "Joan Weber", , "Current Spreadsheet of Employees", , False
--
Hope this helps,

Daniel P
 
Daniel
For the moment I'm using this code , but the objectName is always attached
as an attachment joining the email ( acFormatXLS, acFormatRtf, ...etc )

I'm looking for a solution where i can send the content or template directly
as an email ( no attachments at all )
Thanks again
Umberto
 

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

Back
Top