Hi,
I figured it out. Declare this function in your code:
Private Declare Function SetFocus Lib "user32" (ByVal hwnd As System.IntPtr) As System.IntPtr
then, after you call "SendStringToExecute" caal this function, like this:
Application.DocumentManager.MdiActiveDocument.SendStringToExecute("test", True, False, False)
SetFocus(Application.DocumentManager.MdiActiveDocument.Window.Handle)
I hope this helps,
Regards,
Filipe Marcelino