michellecole
Programmer
I am trying to send a particular report in two formats, .snp and .rtf (.rtf for those recipients on older OS of Windows). At this point in the code, I have determined who can get which format. The first report will send, but the second doCmd.SendObject will not execute. (it goes through each line of code in the debugger, but it won't send the email). If I comment out the first doCmd.SendObject code, the second one will execute. I thought maybe it needed some time to finish executing so I placed the sleep command inbetween but the second doCmd still will not execute. Do you see something I am missing? Any Ideas?
Thank you,
Michelle
:
:
If IsEmpty(strTo) Then
'do nothing
Else
DoCmd.SendObject acReport, stDocName, "SnapshotFormat(*.snp)", strTo, "", "", strSubject, strText, False, ""
End If
Sleep (10000) 'sleep 10 seconds to allow execution of first report...
If IsEmpty(strToRichText) Then
'do nothing
Else
DoCmd.SendObject acReport, stDocName, "Rich Text Format(*.rtf)", strToRichText, "", "", strSubject, strTextRT, False, ""
End If
:
:
Thank you,
Michelle
:
:
If IsEmpty(strTo) Then
'do nothing
Else
DoCmd.SendObject acReport, stDocName, "SnapshotFormat(*.snp)", strTo, "", "", strSubject, strText, False, ""
End If
Sleep (10000) 'sleep 10 seconds to allow execution of first report...
If IsEmpty(strToRichText) Then
'do nothing
Else
DoCmd.SendObject acReport, stDocName, "Rich Text Format(*.rtf)", strToRichText, "", "", strSubject, strTextRT, False, ""
End If
:
: