Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft Excel is present?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00463215
Message ID:
00466169
Views:
14
This is a good trick Louis, thanks!

>>ANother trick
>>**********
>
>More trick
>
>
>*----------------------------------------------------
>* FUNCTION BuscaExcel
>*----------------------------------------------------
>* Busca si Excel está instalado
>* RETORNO: .T. Si Excel está instalado
>* USO: ? BuscaExcel
>*----------------------------------------------------
>FUNCTION BuscaExcel
>	LOCAL lcArchivo, lc, lcRutaExe, llRet
>
>	*--- Creo un archivo .xls
>	lcArchivo = SYS(5) + "\" + SYS(3) + ".xls"
>	STRTOFILE("*", lcArchivo, .T. )
>
>	lc = SPACE(0)
>	lcRutaExe = SPACE(128)
>	llRet = .F.
>
>	DECLARE INTEGER FindExecutable IN shell32 ;
>		STRING @lcArchivo, ;
>		STRING @lc, ;
>		STRING @lcRutaExe
>
>	*--- Busco el archivo asociado a .xls
>	IF FindExecutable(@lcArchivo, @lc, @lcRutaExe) > 32
>		IF "EXCEL.EXE" $ UPPER(lcRutaExe)
>			llRet = .T.
>		ENDIF
>	ENDIF
>	DELETE FILE (lcArchivo)
>	RETURN llRet
>ENDFUNC
>
>*----------------------------------------------------
>
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform