I'm using ShellExecute() API to print a Word Document, & at times
ShellExecute() API returns the value 2.
Which means the FILE CANNOT BE FOUND.
But this isn't so, the file does indeed exist.

The code fragment is as follows,
ShellExecute(lnHandle,"Print",lcFile,"","",1)

Where lcFile is the FULL PATH & NAME of the FILE.

NOTE : The word document doesn't have any Macros. & at times the
ShellExecute() function works (ie the word document gets printed out, ONLY
at times does this fail).
Ie, only on certain occasions does ShellExecute return the value 2 (also the
file is the same in all such calls).

Does anyone out there know, why ShellExecute returns 2 (ie why ShellExecute
says that the file cannot be found).

Best Regards,

Thilaka