Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Microsoft Excel is present?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463215
Message ID:
00463228
Vues:
16
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform