SendKeys to another application : Shell « Windows API « VBA / Excel / Access / Word






SendKeys to another application

 
     Sub SKeys()
         Dim dReturnValue As Double
         dReturnValue = Shell("NOTEPAD.EXE", vbNormalFocus)
         AppActivate dReturnValue
         Application.SendKeys "Copy Data.xlsx c:\", True
         Application.SendKeys "~", True
         Application.SendKeys "%FABATCH%S", True
     End Sub

 








Related examples in the same category

1.Creates a text files and saves it
2.Returning the Task ID of the Started Application
3.Starting Another Application
4.Having Excel dial the phone, one key at a time
5.Using VBA to Program Open XML Files