>>>Have you verified what does lcFileName containt? Perhaps you need to pass the file name with the full path?
>>>Also, you may want to examine the error code from ShellExecute - it provides the reason why the command fails.
>>
>>Yes, that's not an issue. The external executable has a config file that tells it where to look for the files to be processed. My impression is that ShellExecute doesn't produce an error, just that the external executable doesn't produce any output, but I will check that further.
>
>Still, returning the value from ShellExecute is a must, IMHO.
Just tried it both ways. RunAny (ShellExecute) returns 42 in both cases, but the external executable produces output when run from the command window, not when run within the app. The is a slight delay before the output file shows up, maybe a second or so; could that be having some effect? Stopping the process after the first file in Trace mode, however, still does not get any output from within the app, no matter how long I wait. And that's regardless of whether the DOEVENTS or the Sleep() call has been made.
Ray Roper