Capture error when cancel is clicked on email confirmation

M

Mike B

Is there anyway to capture the error message if a user clicks cancel on
the email confirmation? I am using custom code to create a unique file
name and to email the URL to the doc. Everything seems to be working
correctly except when someone clicks on cancel.

What I would like to do is basically capture the error and generate my
own error message. Is this possible (I am using vbscript)?

Thanks,

Mike
 
M

Mike B

Greg,

Thanks for the reply, I am not sure how to do that as I am fairly new
to InfoPath. Could you point me in the right direction on where I can
find info on Try/catch?

A work around that I have started using is using On Error resume next;

On error resume next
objEmail.Submit()
errNum = err.number
on error goto 0
If errNum <> 0 then
Msgbox "blah"
Exit Sub
End if
 
Top