I thought I waould at least tell you that my information tells me that Shell does not support a verb "close". Also, I don't think notepad provides this verb (although on my system I couldn't even find notepad in the registry so I gues it's not a COM object?)
From a logical point of view, if you consider what Shell would be doing if you were able to get it to close an application, it would have to "guess" as to which running instance of notepad you want to close.
I suspect you will need to use a combination of AppActivate and SendKeys to close the notepad instance. This will reply on you knowing the application title (what's in the title bar) and then the question, "What if there are two with the same title?"
I don't knowBut someone else will
This reply was intended to hopefully save you any more frustration on the Shell command...
Hope it helps
Paul Lewis




But someone else will 
Reply With Quote