Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE error code during shell run
Message
 
 
À
14/11/2002 18:27:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00722999
Message ID:
00723003
Vues:
17
Enclose file name into quotes because of the spaces in the name.
m.loShell.Run( ["C:\PROGRAM FILES\AIMS\V20\SSREPORT.PDF"], 3, .T. )
>Why does the first code snippet work while the second one generates an error?
>
>Local loShell As Object
>
>m.loShell = Createobject( [WScript.Shell] )
>
>If Vartype( m.loShell ) == [O]
>
>	*-- Why does this code snippet work while the one below generates an error
>	If File( [C:\$DEV\AIMS\LIB\SSREPORT.PDF] )
>
>		m.loShell.Run( [C:\$DEV\AIMS\LIB\SSREPORT.PDF], 3, .T. )
>		
>	EndIf
>	
>	If file( [C:\PROGRAM FILES\AIMS\V20\SSREPORT.PDF] )
>
>		m.loShell.Run( [C:\PROGRAM FILES\AIMS\V20\SSREPORT.PDF], 3, .T. )
>		* OLE error code 0x80070002: The system cannot find the file specified.
>
>	EndIf
>	
>Endif
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform