Email report in PDF from access - HTML

  • Thread starter butboris via AccessMonster.com
  • Start date
B

butboris via AccessMonster.com

I am trying to send a report by email in HTML,

I am trying not to use the DoCmd.sendObject method as this does not seem to
allow the user to do anything in access until the email has been sent and th
eemail is in plaintext.

I have look at previous threads but not found the solution to add a report as
an attachment, only the below code which I adapted(Thanks) to create the
email

I am using the folowing code to create an email in outlook, this works fine
but I need to add a report from the database as an attachment.

What code could I add to allow the report to be created and then attched to
the email?

I am using Access 2007 and outlook 2007

Many Thanks!
**********************************
Dim objOutlook As Outlook.Application
Dim newMail As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.application")
Set newMail = objOutlook.CreateItem(olMailItem)

With newMail
.To = Me.Controls("E-mail Address").Value
.BodyFormat = olFormatHTML
.Subject = "Feedback regarding" & " " & [Forms]![CourseLocationDetails]!
[CourseName].Column(1)
.Body = "Dear" & " " & [First Name] & " " & [Last Name]
.Display
End With

Set newMail = Nothing
Set objOutlook = Nothing

*******************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top