Hi there and welcome !
TextEdit, unfortunately is not very AppleScript aware...
but here's one way you can do it, when TextEdit opens it normally 'opens' a blank document, quit textEdit then try this script...
tell application "TextEdit"
activate
save the front document in "Macintosh HD:Users:KmanCat

rogramFile.txt"
end tell
If you want to do a lot of scripting then have a look at
TextWrangler it's free and a lot more powerful than TextEdit, and it's AppleScriptable !
Happy New Year !
Ric