set folderpath to "Macintosh HD:Users:Phoenix:test:"
tell application "TextEdit"
set myDoc to document 1
set text of myDoc to "Hello World"
set filepath to folderpath & "hello.txt"
close myDoc saving yes saving in filepath
end tell
set folderpath to "Macintosh HD:Users:Phoenix:test:"
tell application "TextEdit"
set myDoc to document 1
set text of myDoc to "Hello World"
set filepath to folderpath & "hello.txt"
close myDoc saving yes saving in filepath
end tell
Does anyone know how to modify this script to save the file as format “Word 2007 (docx)”?
This is a save option within Leopard’s TextEdit but would to automate the process just like the above script (saving and closing the file). Preferably would like to know know how to modify the script without writing keystrokes, but if necessary, so be it!