[Outlook 2003] VBA created email and clicking no/cancel
Easy question, just looking for confirmation.
I have a database that uses Outlook to send an email confirmation. If the user accidentally (or otherwise) clicks No or Cancel when outlook asks if this is a virus, does Outlook completely remove the email message that was created leaving no trace? No draft, no out box/sent/deleted/purge...
Re: [Outlook 2003] VBA created email and clicking no/cancel
hi, as far as i'm aware the mail item is not stored, i will test this for you later i am running a large process just now and cant run more code.
i'm sure that you can trap the user pressing cancel in the error handling of the sub creating the mail to iterate through and ask them again to send the mail.
will get back to you after lunch
David
Re: [Outlook 2003] VBA created email and clicking no/cancel
hi,
you can trap the user pressing no using the error handler by using the below
vb Code:
Err_Handler:
Debug.Print err.Number, err.Description
If err.Number = 287 Then
MsgBox "I have experienced problems sending this message. Please remember to select 'OK' on the Outlook confirmation dialog box when it appears.", 48, "Message problems."
Exit Function
End if
Now when you get this you could always force it to reiterate infinitly(not good of course) or a number of times by using a counter
cheers
David