Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if Outlook is installed?
Message
 
 
To
22/09/2004 11:59:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00945014
Message ID:
00945180
Views:
28
Thank you very much, Cetin.

>>The following line of code
>>
>>
>>oOutlook = CreateObject("Outlook.Application")
>>
>>
>>generates and error, if Outlook is not installed. Is there a way to check if Outlook is installed?
>>
>>Thank you.
>
>
>? _IsClassRegistered("Outlook.application")
>
>function _IsClassRegistered
>lparameters tcClass
>#DEFINE HKEY_CLASSES_ROOT    -2147483648
>#DEFINE ERROR_SUCCESS		0	&& OK
>
>DECLARE Integer RegOpenKey IN Win32API ;
>	Integer nHKey, String @cSubKey, Integer @nResult
>
>DECLARE Integer RegCloseKey IN Win32API ;
>	Integer nHKey
>
>local lnKey
>lnKey = 0
>llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, tcClass, @lnKey) = ERROR_SUCCESS )
>if llRetVal
>  RegCloseKey(lnKey)
>endif
>*vfp7
>*CLEAR DLLS 'RegOpenKey', 'RegCloseKey'
>return llRetVal
>
Cetin
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform