>>WITH thisform.combo1 >> >>thisform.text17.value=.list(.listindex,1) >>thisform.text4.value=.list(.listindex,2) >> >>m.lcFileName=thisform.text4.value+"."+"doc" >> >>SET DEFAULT TO c:\deal >> >>declare long ShellExecute in "shell32.dll" ; >> long hwnd, string lpszOp, ; >> string lpszFile, string lpszParams, ; >> string lpszDir, long nShowCmd >> >>ShellExecute(0,'Open', m.lcFileName, 0,0,1) >>*ShellExecute(0,'Open', GETFILE(), 0,0,1) >> >>ENDWITH >> >>>>
>Set Default To c:\deal > >m.lcFileName=Fullpath(Trim(Thisform.text4.Value)+"."+"doc") > >If File(m.lcFileName) > > Declare Long ShellExecute In "shell32.dll" ; > long HWnd, String lpszOp, ; > string lpszFile, String lpszParams, ; > string lpszDir, Long nShowCmd > > lnResult = ShellExecute(0,'Open', m.lcFileName, 0,0,1) > IF !(m.lnResult > 32) && check MSDN documentation for error codes > endif >Else > Messagebox( m.lcFileName + " doesn't exist.") >Endif>Cetin