Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft Excel is present?
Message
 
To
12/01/2001 15:30:37
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00463215
Message ID:
00463228
Views:
15
>Hi,
> I need to check if Microsoft Excel is installed for use this:
>
>this.oExcelSession = CreateObject("Excel.Application")
>
> If it's not installed I get an error message.
>
>T.I.A.


Try looking of the registry key to it exists.
In my case that is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Excel
nRegKey = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\Excel", ;
	lpdwReserved, KEY_QUERY_VALUE, lnResult)
if nRegKey = 0
   *- excel is installed		
   =RegCloseKey(HKEY_LOCAL_MACHINE)
   lResult = .t.
endif
Previous
Reply
Map
View

Click here to load this message in the networking platform