Solved

Using Outlook Redemption to Send Report from Access

Posted on 2007-11-27
3
387 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

808 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