>I am trying to implement the ShellExecute function to open a various documents on a system (MS Word docs, pdf, Excel sheets, etc). All file types work as expected with the exception of MS Word docs - they open and then produce a VFP Error #12 Variable '18' is not found. There is no code in the method that contains anything related to an '18'.
>
>Anyone seen this before? Thanks in advance.
>
>DECLARE INTEGER ShellExecute IN shell32.DLL ;
> INTEGER hndWin, ;
> STRING cAction, ;
> STRING cFileName, ;
> STRING cParams, ;
> STRING cDir, ;
> INTEGER nShowWin
>
>ShellExecute(0,"open","c:\test.doc","","",1)
Try getting the return result via
lnresult = ShellExecute(0,"open","c:\test.doc","","",1)
the return code will help us fix your problem.
George
Ubi caritas et amor, deus ibi est