tractorvix
Technical User
I have an email automated with 2 attachments. I also have an error handler that will skip records with invalid email addresses and move onto the next record. However, when it sends the next email the attachments are duplicated.
I currently have
errorhandler:
Select Case Err.Description
Case "Outlook does not recognize one or more names. "
Set MailOutLook = Nothing
Set appOutLook = Nothing
MailUser = ""
msgSubject = ""
msgbody = ""
rst.Edit
rst.Comments = "Cannot send with Personnel Number"
rst.Update
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Resume 10
and assumed that by setting the appoutlook to nothing it would remove them before continuing with the loop, but it doesn't seem to be happening.
Anyone any ideas?
Vix
I currently have
errorhandler:
Select Case Err.Description
Case "Outlook does not recognize one or more names. "
Set MailOutLook = Nothing
Set appOutLook = Nothing
MailUser = ""
msgSubject = ""
msgbody = ""
rst.Edit
rst.Comments = "Cannot send with Personnel Number"
rst.Update
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
Resume 10
and assumed that by setting the appoutlook to nothing it would remove them before continuing with the loop, but it doesn't seem to be happening.
Anyone any ideas?
Vix