Solved

Using Outlook Redemption to Send Report from Access

Posted on 2007-11-27
3
395 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access question 3 41
Parameter Query 33 50
MS Access How can I create a list box query for my report with sub-form data? 2 36
Convert VBA UDF to SQl SERVER UDF 4 47
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

713 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