Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping e-mail OLE errors
Message
De
17/01/2000 06:22:04
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Trapping e-mail OLE errors
Divers
Thread ID:
00318878
Message ID:
00318878
Vues:
62
How can I trap log on errors within an error trap?

I have an error form where the user enters who they are, where they are and a some comments. This info can then be faxed or e-mailed back to us so that it can be fixed. The problem I have is trapping the OLE error if they are not logged on or if they choose to cancel the logon. As this is already within the 'on error' then another error trap to set an error flag is ignored. Is there any way of trapping the OLE errors while using e-mail?

By the way this routine works well else where in the app (i.e. registration).

Here's the code and potential errors that could occur.

* Create a mapi session
objSession = createobject( "mapi.session")

* Store the current error status and set an error flag if something goes wrong
lcOldErr = on( "error" )
on error llError = .t.

* Logoon on to the current session without any dialog
* An error will occur here if e-mail is not open or loged in
objSession.Logon( .null., .null., .f., .f.)

if llError
* If an error occured while logging on automatically
* - present the logon dialog
* An error can occure here if the user cancels the log on
objSession.Logon()
endif

on error &lcOldErr

Any ideas??
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform