C
cj
When I run myMAPIMessage.Send(True) if the user cancels the resulting
email it causes an exception. How do I trap this particular exception
and say that's ok?
try
myMAPIMessage.Send(True)
catch ex as ??????
'this is ok
catch ex as exception
'show these
messagebox.show(ex.message)
end try
Here is what the exception I'm getting is as shown in the command window:
? ex
{System.Runtime.InteropServices.COMException}
[System.Runtime.InteropServices.COMException]:
{System.Runtime.InteropServices.COMException}
HelpLink: "MAPI98.CHM#32001"
InnerException: Nothing
Message: "User cancelled process"
Source: "MAPIMessages"
StackTrace: " at MSMAPI.MAPIMessagesClass.Send(Object vDialog)
at WindowsApplication20.Form1.SndMAPIMail(String subj, String msg)
in C:\Documents and Settings\cj\My Documents\Visual Studio
Projects\WindowsApplication20\Form1.vb:line 565"
TargetSite: {System.Reflection.RuntimeMethodInfo}
email it causes an exception. How do I trap this particular exception
and say that's ok?
try
myMAPIMessage.Send(True)
catch ex as ??????
'this is ok
catch ex as exception
'show these
messagebox.show(ex.message)
end try
Here is what the exception I'm getting is as shown in the command window:
? ex
{System.Runtime.InteropServices.COMException}
[System.Runtime.InteropServices.COMException]:
{System.Runtime.InteropServices.COMException}
HelpLink: "MAPI98.CHM#32001"
InnerException: Nothing
Message: "User cancelled process"
Source: "MAPIMessages"
StackTrace: " at MSMAPI.MAPIMessagesClass.Send(Object vDialog)
at WindowsApplication20.Form1.SndMAPIMail(String subj, String msg)
in C:\Documents and Settings\cj\My Documents\Visual Studio
Projects\WindowsApplication20\Form1.vb:line 565"
TargetSite: {System.Reflection.RuntimeMethodInfo}