Great! That worked for me but with a small error. First time the notepad window is opened without any text. But when the code is executed the second time the desired text appears in the first notepad window, and a new empty notepad window appears.:confused:
Need your help pleaseeeeeeee
Dim p As IntPtr
System.Diagnostics.Process.Start("notepad.exe")
p = GetHandle("notepad")
SetNewText(p, log)