I'm trying to save the open notepad at a specific folder (C:\Desktop\testing). This is my code, but it doesn't work.
Sub Savetxt()
Call Shell("NOTEPAD.EXE", 1)
SendKeys "testing", True
SendKeys "^s", True
Item.SaveAs "C:\Desktop\testing" & filename & ".txt", olTXT
SendKeys "{enter}", True
SendKeys "%{F4}", True
End Sub
Sub Savetxt()
Call Shell("NOTEPAD.EXE", 1)
SendKeys "testing", True
SendKeys "^s", True
Item.SaveAs "C:\Desktop\testing" & filename & ".txt", olTXT
SendKeys "{enter}", True
SendKeys "%{F4}", True
End Sub