Try to export a report as an attachment

gblack

Registered User.
Local time
Today, 05:44
Joined
Sep 18, 2002
Messages
632
I have a report that gets passed a paramter value when opened.

I am current trying to send the report as an attchment, but because the report must have the parameter value and the DoCmd.SendObject doesn't seem to have a place for an arg... I have to first open the report, then try to send it... like so:

Code:
DoCmd.OpenReport "00100_Rpt_Document(Draft)", acViewPreview, , , , intAgreementID
        DoCmd.SendObject acSendReport, "00100_Rpt_Document(Draft)", acFormatPDF, "gary.black@xxx.gov", , , "Sending A Report", "This is the Access Report"
        DoCmd.Close acReport, "00100_Rpt_Document(Draft)"

When I do this I get an error message stating:
No profiles have been created. To create a new profile, use the Mail icon in the Control Panel.

And if I try to use just the SendObject command Access just hangs:

Code:
        DoCmd.SendObject acSendReport, "00100_Rpt_Document(Draft)", acFormatPDF, "gary.black@xxx.gov", , , "Sending A Report", "This is the Access Report"


I have seen two post on this site pertaining to the error message I posted, but no one ever responded to them, which doesn't bode well I guess:(


Thanks for any help,
Gary
 

Users who are viewing this thread

Back
Top Bottom