tell application "TextEdit"
set newFile to (((path to desktop) as text) & "New_Doc.rtf")
set _doc to make new document with properties {path:newFile}
set text of _doc to "This is sample text"
save _doc
end tell
--> ERROR: The document “~:Desktop:New_Doc.rtf” could not be saved. You don’t have permission.
By contrast this one works:
tell application "TextEdit"
set newFile to (((path to desktop) as text) & "New_Doc.rtf")
set newFile to POSIX path of newFile
set _doc to make new document with properties {path:newFile}
set text of _doc to "This is sample text"
save _doc
end tell