>ok let's say i used this version - it allows widows outside the vfp window.
>it does open in notepad but i don't know the code to close notepad. any suggestions i could try?
>
>thanks
>
>k
>
>
>#DEFINE SW_SHOWNORMAL 1
>lcUrl = "c:\vaniermu\ensnams.txt"
>oShell = Createobject("wscript.shell")
>oShell.Run(lcUrl)
I think the idea of this code is to let user view the text in notepad and then close. If you want to close it automatically, we need to know handle of the window or the process ID. As the worse case scenario we can always use Sergey's code to terminate the application (assuming it's always notepad), but I'm not sure it's a good solution.
If it's not broken, fix it until it is.
My Blog