set WshShell = WScript.CreateObject("WScript.Shell") KL = true do while KL if WshShell.AppActivate("Microsoft Word") then WriteWord() KL = false end if WScript.Sleep 1000 loop function WriteWord() WShshell.SendKeys "{CAPSLOCK}" WshShell.SendKeys "{F2}" WshShell.SendKeys "{F3}" WScript.Sleep "5000" WshShell.SendKeys "{F2}" WshShell.SendKeys "{F3}" end function