Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if Outlook is installed?
Message
From
22/09/2004 15:56:31
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00945014
Message ID:
00945191
Views:
33
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform