E-mailing reports from Access

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

JackAndCoke

Thread Starter
Joined
Apr 26, 2007
Messages
152
I'm sending a report every hour on Saturday and I need to figure out a simpler solution then copying and pasting.

Is there a way in access to send an e-mail that in the body of the e-mail (not as an attachement) I show:

Top Performer: (this will be generated by a query very easily)

Hourly Rankings: (also generated by a query)

Cumulative Ranking: (also generated by a query).

If this can't be done in access I've been e-mailing an attachment from excel using the

Dim OL As Object
Dim EmailItem As Object
Dim Wb As Workbook

Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(olMailItem)
Set Wb = ActiveWorkbook
Wb.Save
With EmailItem
.Importance = olImportanceHigh
.Subject = "Central Webathon Reporting Oct 3-5"
.Body = "Julia, Attached is the webathon report for the weekend of Oct. 3rd. If there are any issues please contact me at [email protected] or call my cell at xxx-xxx-xxxx"
.To = "[email protected]"
.CC = "[email protected]"
.Attachments.Add Wb.FullName
.Send
End With

Application.ScreenUpdating = True

Set Wb = Nothing
Set OL = Nothing
Set EmailItem = Nothing
Is there a way using this code to paste three ranges of cells into the .Body instead of just one sentence?

My boss pretty much Lumberged me into this....yeah...we're going to need you to work Saturday....
 
Joined
Oct 20, 2004
Messages
7,837
I think the body of the code is missing the important line "my boss is an ****************"....but, otherwise can't help. Hopefully OBP or another good coder and Access person will show up.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Yes that is very easy to achieve in Access, you just need a recordset to get the data from the Query that you mentioned and then insert it in to the "Body" string of the email message.
If you can create the Query(s) I can create the VBA.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top