SendObject - Report PDF to Email

WillJ

Registered User.
Local time
Today, 21:19
Joined
Oct 20, 2012
Messages
40
Hi All,

Thanks inf advance for the help with this, I've spent a fair bit of time playing around with it but nothing seems to be working.

I am trying to send a report in PDF format using the SendObject command, this will execute when a check box is ticked.

The Error I get is;

'Compile error; Wrong number of arguments or invalid property argument'

I've been through a fair few times and can't see it : (! Help

The code is as follows;

Code:
Private Sub ProductionRequestsEmail_AfterUpdate()
If ProductionRequestsEmail = True Then
varTo = [ContactEmail]
varCC = "XXX@XXX.COM"
varSubject = [tbDocumentSubmissionID]
varBody = "Please find your attached report ... "

DoCmd.SendObject acSendReport, "rptPC", acFormatPDF, varTo, varCC, , varSubject, varBody, , , , True

End If
End Sub
 
Whats the last True for? Remove everything after varBody.
 
You are a star : ).
Thanks, works a treat now!
 

Users who are viewing this thread

Back
Top Bottom