Access VBA Email report as pdf via aoutlook

Hi

In my Access database I want to automatically email a report as a PDF via outlook.
What Access VBA code would I use to do this?

Thanks
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

pls try
DoCmd.SendObject acSendReport, "Invoice", acFormatPDF, "ToName", , "myInvoiceReport", , False

Open in new window

Regards
0
 
Gustav BrockConnect With a Mentor CIOCommented:
Ah, it takes a little more:

Receiver = "john.doe@example.com"
Subject = "Invoice 12345"
Body = "Attached please find the invoice of this month."
DoCmd.SendObject acSendReport, "NameOfReport", acFormatPDF, Receiver, , , Subject, Body", False

Open in new window

1
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.