P
PeterM
I have code in a form that opens a report and sends it to an email recipient.
I use:
DoCmd.SendObject _
acSendReport, _
Me.ReportCalled, _
me.ReportTypeDesc, _
Me.EmailAddress, _
, _
, _
Me.EmailSubject, _
Me.EmailMessage, _
This code generates an error saying the output type is invalid.
Me.ReportTypeDesc is set to acFormatRTF. I verified this in debug mode.
When I change the code to:
DoCmd.SendObject _
acSendReport, _
Me.ReportCalled, _
acFormatRTF, _
Me.EmailAddress, _
, _
, _
Me.EmailSubject, _
Me.EmailMessage, _
it works fine. Is it not possible to use a variable to contain the
outputtype of the report being emailed?
Thanks for your help!
I use:
DoCmd.SendObject _
acSendReport, _
Me.ReportCalled, _
me.ReportTypeDesc, _
Me.EmailAddress, _
, _
, _
Me.EmailSubject, _
Me.EmailMessage, _
This code generates an error saying the output type is invalid.
Me.ReportTypeDesc is set to acFormatRTF. I verified this in debug mode.
When I change the code to:
DoCmd.SendObject _
acSendReport, _
Me.ReportCalled, _
acFormatRTF, _
Me.EmailAddress, _
, _
, _
Me.EmailSubject, _
Me.EmailMessage, _
it works fine. Is it not possible to use a variable to contain the
outputtype of the report being emailed?
Thanks for your help!