Hi - I am attempting to send a PDF of a report via email and the SendObject function but I don't know how to create the attachment with a dynamic name. What happens is the name of the report gets passed to the name of the attachment.
Code:
DoCmd.SendObject acSendReport, "rpt_Certificate", acFormatPDF, "replace.me@domain.com", , , Subject, Body, Yes, ""
What I would like to do is name the attachment from a field.
Something similar to this:
Code:
DoCmd.SendObject acSendReport, "rpt_Certificate" [TaskSR] & ".PDF", acFormatPDF, "replace.me@domain.com", , , Subject, Body, Yes, ""