Solved

Using Outlook Redemption to Send Report from Access

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
count unique records in access report 2 23
Run Time Error 3075 15 47
Change AD password via MS Access DB 2 20
DBF to ... Converter 5 49
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

23 Experts available now in Live!

Get 1:1 Help Now