Quote:
quote:Originally posted by Kenny Alligood
Does anyone know how to get the SendObject method to accept a variable as opposed to a string..? I am trying to send email to specific people depending on specific criteria and the only option I have (other than a really lengthy if then .. else or Select Case structure) is SendObject.
Any assistance of suggestions would be greatly appreciated.
Kenny Alligood
|
I presume you are referring to
Public Const E_SUBJECT As String = "E Report"
Dim sReportName as String
Dim sMsg As String
Dim sRecip As String
Dim sCc As String
sReportName = "rptConsolidation"
sRecip = "
[email protected]"
sCc = "
[email protected]"
sMsg = "The SendObject method silently fails. " & _
"See http://support.microsoft.com/default.aspx?scid=kb;en-us;260819"
DoCmd.SendObject ObjectType:=acSendReport, _
ObjectName:=sReportName, _
OutputFormat:=acFormatRTF, To:=sRecip, CC:=sCc, _
Subject:=E_SUBJECT, MessageText:=sMsg, _
EditMessage:=True
It works for me. But be warned sMsg can't be very long!
Check Microsoft Technet #Q260819 (it's the URL above)
Otherwise you have to go to plan B.
Microsoft seems to have dropped this one in mid-stream
in their rush to the WEB.
What do you expect from a MONOPOLY!