get path of foremost text edit document

The script below displays the path of the frontmost finder item in a dialog. Is it possible to do something like this with the foremost text edit document?

#display path of frontmost finder item in dialog
tell application "Finder"
	set pathOfSelectedFinderItem to (folder of the front window) as text
	display dialog pathOfSelectedFinderItem
end tell

Hi,

in TextEdit documents have a path property


tell application "TextEdit"
	set pathToFrontDocument to path of document 1
end tell


My productivity would be considerably lower without you Stefan, thanks again!