Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE error code during shell run
Message
From
14/11/2002 18:27:31
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
OLE error code during shell run
Miscellaneous
Thread ID:
00722999
Message ID:
00722999
Views:
86
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
Barry Taft
i am only worried in the short term. once there is a problem, the solution usually presents itself.
Next
Reply
Map
View

Click here to load this message in the networking platform