La clave es err.Description
sub x ()
On Error GoTo oops:
'CODIGO VA AQUI
Dim ol As Outlook.Application
Set ol = New Outlook.Application
Set mail = ol.CreateItem(olMailItem)
.to = "email@example.com"
.Subject = "Error in HTM Status Report."
.Body = "An error was detected in the application. Please check it: " & vbNewLine & "'" & err.Description & "'"
MsgBox ("There was a problem with the execution, the server may be turned off. An error report has been sent to firstname.lastname@example.org")
No hay comentarios:
Publicar un comentario