Creates a text files and saves it : Shell « Windows API « VBA / Excel / Access / Word






Creates a text files and saves it

 
Sub SKeys()
   Dim ReturnValue
   ReturnValue = Shell("NOTEPAD.EXE", vbNormalFocus)
   AppActivate ReturnValue
   Application.SendKeys "Copy Data.xls c:\", True
   Application.SendKeys "~", True
   Application.SendKeys "%FABATCH~", True
End Sub

 








Related examples in the same category

1.Returning the Task ID of the Started Application
2.SendKeys to another application
3.Starting Another Application
4.Having Excel dial the phone, one key at a time
5.Using VBA to Program Open XML Files