If a user opens a Word document and then closes it, I want to put some code in the File_Close event that will check whether the file has been changed since the last time it was saved. Excel has a Worksheet_Change event that does even more than I need. Is there any workaround in Word that would duplicate that?
Details:
I have some code that when a user opens up a Word document with a date appended to the name, as in "Proposal 2005 09 30", the code will change the name to the current date, as in "Proposal 2005 10 01". Any files with earlier dates serve as a backups to the file just opened under the new name. To change the name of a document requires saving the file under the new name.
If the user then does nothing but look at the document and close it without making any changes, there is no point in having the duplicate file saved on the hard disk. I therefore want to delete it.
How can I quickly tell whether the user made any changes in the document when he or she closes it, so that I can, if necessary, delete useless files?
Thanks for any help you can provide!
Details:
I have some code that when a user opens up a Word document with a date appended to the name, as in "Proposal 2005 09 30", the code will change the name to the current date, as in "Proposal 2005 10 01". Any files with earlier dates serve as a backups to the file just opened under the new name. To change the name of a document requires saving the file under the new name.
If the user then does nothing but look at the document and close it without making any changes, there is no point in having the duplicate file saved on the hard disk. I therefore want to delete it.
How can I quickly tell whether the user made any changes in the document when he or she closes it, so that I can, if necessary, delete useless files?
Thanks for any help you can provide!