Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if Outlook is installed?
Message
De
22/09/2004 15:56:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00945014
Message ID:
00945191
Vues:
34
Hi Dmity.

The following line of code
oOutlook = CreateObject("Outlook.Application")
generates and error, if Outlook is not installed.


The following code (VFP 8.0 and later) will allow you to gracefully let the user know that there is a problem:
TRY
 loOutlook = CREATEOBJECT( 'outlook.application' )
CATCH TO loErr
 IF loErr.ErrorNo = 1733
   *** class definition not found
   MESSAGEBOX( [Outlook is not registered on this computer] )
 ENDIF
ENDTRY
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform