Unable to email report

vcarrill

Registered User.
Local time
Today, 06:08
Joined
Aug 22, 2019
Messages
62
I'm sure its something simple and I am just overlooking it.

I am using ACCESS 2010, and when I generate my Report under Preview this is what I see:

1602180328733.png


The ability to attach it and email it is not available. Appreciate the advice on being able to email any report I generate.

Thank you
 
Hi. Just a wild guess, but do you have a default email client installed (with a default profile)?
 
Hi. Just a wild guess, but do you have a default email client installed (with a default profile)?
Excuse my ignorance, but I read something to this effect but could not find how I do this or check if I have it?

Appreciate you pointing me in the right direction.
 
Excuse my ignorance, but I read something to this effect but could not find how I do this or check if I have it?

Appreciate you pointing me in the right direction.
Basically, how would you manually create/start/compose an email on your computer?
 
Is anyone else seeing the OP's original picture like this?

1602181703259.png


I'm unable to glean a lot from that.
 
Any help?

 
I'm sure its something simple and I am just overlooking it.

I am using ACCESS 2010, and when I generate my Report under Preview this is what I see:

View attachment 85660

The ability to attach it and email it is not available. Appreciate the advice on being able to email any report I generate.

Thank you
Hi. Regarding the image you posted, can you show us the Print Preview Ribbon as well? Specifically, the Email button? Thanks.
 
Hi
You would normally have a Command Button usually on a Form which when clicked runs some VBA Code to send a specific Report as an attachment in an EMail.
 
Hi
You would normally have a Command Button usually on a Form which when clicked runs some VBA Code to send a specific Report as an attachment in an EMail.
Could you direct me to the code please, thanks.
 
Hi
It would be along these lines.
You would need to replace names of Reports etc

Code:
Dim OutApp As Object

Dim OutMail As Object

Dim strSubject As String

Dim strTo As String

Dim strBody As String

Dim strDocname As String

Dim strWhere As String



strDocname = "rptNewTask"

strTo = Me.EMail

strWhere = "[EventTaskID]=" & Me!EventTaskID & "





Set OutApp = CreateObject("Outlook.Application")

Set OutMail = OutApp.CreateItem(0)



strBody = "A new task has been allocated." & vbNewLine & vbNewLine & _

"Please process as normal." & vbNewLine & _

"Thank you,"

On Error Resume Next



With OutMail

.Display

.To = Me.EMail

.Subject = "New Task"

.Body = strBody & vbNewLine & .Body

End With



On Error GoTo 0

Set OutMail = Nothing

Set OutApp = Nothing



DoCmd.OpenReport strDocname, acPreview, , strWhere

DoCmd.SendObject acSendReport, "rptNewTask", acFormatPDF, strTo, , strSubject, strBody
 
@mike60smart I was curious on 2 things
1- What is the intent or thinking behind wrapping the With Outmail block in On Error Resume Next?
2- Would this code send the report using DoCmd.SendObject, AND create a blank email for display?
 

Users who are viewing this thread

Back
Top Bottom