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