>Hi!
>
>I have word document(s) (RTF) file/path names stored in VFP memo fields.
>
>Is there any way I can launch Word (and load the file) from within VFP by "executing" the file name, utilising its file association?
>
>I appreciate that this could be done using automation but I wondered whether there was a way of simply "executing" the file, in the same way that clicking on the file would launch Word and load the file.
>
>Thanks!
>
>-=Gary
Gary,
You can try something like
Declare integer ShellExecute in shell32 ;
integer nWinHandle, string cOperation, string cFileName, string Parameter, ;
string cDirectory, integer nShowWindow
lcFileName = "MyDocument.rtf"
lnReturn = ShellExecute(_VFP.hWnd,"Open",lcFileName,"",Sys(5)+Curdir(),10)
Caroline