When I run myMAPIMessage.S end(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.S end(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 .InteropService s.COMException}
[System.Runtime. InteropServices .COMException]:
{System.Runtime .InteropService s.COMException}
HelpLink: "MAPI98.CHM#320 01"
InnerException: Nothing
Message: "User cancelled process"
Source: "MAPIMessag es"
StackTrace: " at MSMAPI.MAPIMess agesClass.Send( Object vDialog)
at WindowsApplicat ion20.Form1.Snd MAPIMail(String subj, String msg)
in C:\Documents and Settings\cj\My Documents\Visua l Studio
Projects\Window sApplication20\ Form1.vb:line 565"
TargetSite: {System.Reflect ion.RuntimeMeth odInfo}
email it causes an exception. How do I trap this particular exception
and say that's ok?
try
myMAPIMessage.S end(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 .InteropService s.COMException}
[System.Runtime. InteropServices .COMException]:
{System.Runtime .InteropService s.COMException}
HelpLink: "MAPI98.CHM#320 01"
InnerException: Nothing
Message: "User cancelled process"
Source: "MAPIMessag es"
StackTrace: " at MSMAPI.MAPIMess agesClass.Send( Object vDialog)
at WindowsApplicat ion20.Form1.Snd MAPIMail(String subj, String msg)
in C:\Documents and Settings\cj\My Documents\Visua l Studio
Projects\Window sApplication20\ Form1.vb:line 565"
TargetSite: {System.Reflect ion.RuntimeMeth odInfo}
Comment