>Hi
>
>Thanks, the first way does work nicely when I put the full path name in as follows:
>
>lnResult=ShellExecute(FindWindow( 0, _SCREEN.caption), "Open", alltrim(lcDocument_name), "", "e:\uk e_filing\nationwide_uk_v1\certificates\", 1)
>
>How come it doesn't work by just entering : "\certificates\" as I dont really like hard coding the path?
Nelly,
If your current drive is e:, "\certificates" means e:\certificates, whereas "certificates" (without the initial backslash!) means (Current folder)\Certificates.
I believe there is no need to hardcode the path; just omit the backslash.
If this doesn't work, as an alternative you can use
fullpath("") to obtain the current disk + folder, and pass it to the function. fullpath("") gives you more information than curdir().
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)