If you want your script to open up notepad, you can try Run("notepad.exe"), then wait for the window to become active, then use Send() to send that information to notepad.
But if you mean, you want to press a key and have that information typed out, then you probably want to change MsgBox to Send. Then put that inside a function. Then bind the function to a hot key. See HotKeySet in help file.