Question how do I save an active notepad at a specific folder?

Status
Not open for further replies.

Cookiez

New member
Joined
Jun 15, 2022
Messages
1
Programming Experience
Beginner
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
 
Status
Not open for further replies.
Back
Top