Printing from InDesign

I am trying to write a script that will let me rename a file before printing. Then it would rename the file back to its original name.

The name we have on the finder is too large and it is getting confussing on the rip station.

I just started playing with scripting a couple of weeks ago. I hope our attempt will not offend anyone, and please do not laugh. Or laugh, but please help.

This what I have so for. It is not working. Please point me on the right direction. Thank you in advance for all the help.

set myFIleName to display dialog “Enter the File Name” default answer
“” as string

tell application “InDesign 2.0.2”
activate
set mydoc to active document
tell mydoc

set myName to (text returned of myFIleName)
set oldname to file name

– set file name to myName

set document name to myName – getting an error here
print mydoc with print dialog

end tell

end tell