Opening Attachments

Is there a script I can use when someone opens (not saves, directly opens) and edits an attachment (in Word, for example) that it may save to a defined directory using the filename of the actual attachment? A few times we have had people do this and of course when they’re done the temp file is deleted.

Thanks.