The following VBScript code opens a copy of the currently running script with Notepad.
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%windir%\notepad " & WScript.ScriptFullName
The following VBScript code does the same thing, except it specifies the window type, waits for Notepad to be shut down by the user, and saves the error code returned from Notepad when it is shut down.
Aside from this there isn't a lot you can do as far as I know. Notepad isn't a COM server of any sort and doesn't expose an automation interface the way Office programs do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.