S
SLP
Hi, I have some code that sends an email with Attachment by CDO. I'm using
it in Access as an automated solution to generating required reports for each
program director that has reports due. Problem is, if an attachment does not
exist, I dont want an email sent. I can't seem to figure that part of the
code out. Any help would be appreciated. Here is part of the code. Thanks
in advance
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Please read: test CDOSYS message with Attachment3"
.HTMLBody = strHTML
On Error Resume Next
Set Object = Expression
If Not IsMissing("G:\Accounting\Development\ExcelToAccess2.xls") Then
Set Attach =
..AddAttachment("G:\Accounting\Development\ExcelToAccess2.xls")
End If
If Attach = 0 Then
Cancel = True
Else: .Send
End If
it in Access as an automated solution to generating required reports for each
program director that has reports due. Problem is, if an attachment does not
exist, I dont want an email sent. I can't seem to figure that part of the
code out. Any help would be appreciated. Here is part of the code. Thanks
in advance
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Please read: test CDOSYS message with Attachment3"
.HTMLBody = strHTML
On Error Resume Next
Set Object = Expression
If Not IsMissing("G:\Accounting\Development\ExcelToAccess2.xls") Then
Set Attach =
..AddAttachment("G:\Accounting\Development\ExcelToAccess2.xls")
End If
If Attach = 0 Then
Cancel = True
Else: .Send
End If