Solved

Using Outlook Redemption to Send Report from Access

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now