Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE IDispatch exception code 0 error
Message
 
 
To
09/01/2004 13:42:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00865520
Message ID:
00865788
Views:
51
Hi Juan,

It's a good idea to have error handler in place in your application. Take a look at article 'Error handling in VFP' by Doug Hennig at http://stonefield.com/techpap.html an the error handler project at http://www.ideaxchg.com/ix07/er/_sys/toccontu.htm. In VFP8 the Structured Error Handling was introduced http://www.code-magazine.com/focus/Article.aspx?quickid=0301072. The code below shows how to ignore the error when user cancels Send action using TRY...ENDTRY.
...
TRY
	thisform.messages.send(.t.) 
CATCH TO oExp WHEN oExp.ErrorNo = 1429
	AERROR(laErr)
	IF "USER CANCELLED" $ UPPER(laErr[3])
		* Ignore
	ELSE
		THROW
	ENDIF
CATCH
	THROW
ENDTRY
...
In previous VFP version you can use local error handler or Error method.

>Hello there
>
>This is probably easy to answer for someone using MAPI services
>
>Using Outlook express my app (VFP7 ) sends the mail without any problem. However if I use Outlook 2000, I have the message:
>
>OLE IDispatch exception code 0 error from MAPImessages: User cancelled the process.
>
>And then I have the choice of "cancel", "suspend", "ignore" "help" . It only happens when I quit the outlook windows without sending the mail ( if I click "send", outlook sends the message and closes without any error message or problem, and my app continues ok )
>
>Probably there is some property in MAPImessages (or MAPIsession) that I can not locate to avoid this error message (or at least eliminate the button "cancel" and "suspend" ), or maybe I am missing something.
>
>My code is fairly simple:
>
>
>thisform.messages.AddressResolveUI= .f.
>thisform.ssesion.LogonUI = .T.
>thisform.ssesion.DownloadMail= .F.
>thisform.ssesion.NewSession= .T.
>thisform.ssesion.signon
>thisform.messages.sessionid = thisform.sesion.sessionid
>
>thisform.messages.compose
>thisform.messages.msgsubject = "mi subject"
>thisform.messages.msgnotetext = "mi message"
>thisform.messages.recipDisplayName= "name@other.net"
>thisform.messages.send(.t.)
>thisform.ssesion.signoff
>
>When I tried to trace the error, the problem, seems located in "thisform.messages.send(.t.)". Is there something else I'am missing here ?
>
>Any help on this matter will be greatly appreciated
>
>Juan
>j_chav@yahoo.com
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform