Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE error code during shell run
Message
 
 
To
14/11/2002 18:27:31
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00722999
Message ID:
00723003
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform