Solved

Using Outlook Redemption to Send Report from Access

Posted on 2007-11-27
3
379 Views
Last Modified: 2008-03-14
I am currently using Outlook Redemption to send out a report from Access.  I am trying to figure out a way to send the report in the body of the e-mail rather than a line by line read which I currently do.  Help would be creatly appreciated.  
0
Comment
Question by:mattfmiller
  • 2
3 Comments
 
LVL 18

Expert Comment

by:jmoss111
ID: 20360021
Why not save the report as HTML and use as the email body?

.CreateMHTMLBody "file://J:/MyFolder/MyBody.htm
0
 
LVL 1

Author Comment

by:mattfmiller
ID: 20360299
where would I put it?
Private Sub Command34_Click()
 
Dim sline As String
Dim ebody As String
Dim db As Database
Set db = CurrentDb
DoCmd.OutputTo acOutputReport, "End of Day E-mail", acFormatHTML, "c:\EODReport.html"
  
  Set olApptr = Outlook.Application
  Set olMsgtr = olApptr.CreateItem(olMailItem)
  Set sfMsgtr = CreateObject("Redemption.SafeMailItem")
  Set sfMsgtr.Item = olMsgtr
  sfMsgtr.Subject = "Daily Production " & [Forms]![Automated Processes]![End Date]
   
  With olMsgtr
  .To = "My e-mail address"
    End With
  sfMsgtr.Send
 
  Set olApptr = Nothing
  Set olMsgtr = Nothing
  Set sfMsgtr = Nothing
  Set sfRcpttr = Nothing
  Kill "c:\EODReport.html"
 
 
 
 
 
End Sub

Open in new window

0
 
LVL 18

Accepted Solution

by:
jmoss111 earned 125 total points
ID: 20361185
I gave you the code for SMTP.

All that you have to do with Outlook is add .Body = "c:\EODReport.html"
under the With olMsgtr before the .Send
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question