Don't alter file date after edit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using a macro to automatically edit Word file properties. Is there a way
to retain the file date after the edited file has been saved by the macro?
I'd like to retain the same file date for sorting purposes.

Thanks.

Jason
 
If you're referring to { DATE } fields -- these always show the current date
(whether or not you edit the document). Change to { CREATEDATE } if you want
to show, unchangingly, the document creation date.
 
Hi Jezebel, thank you for your response however its not quite what I'm after.
I do not need to retrieve the file date into the document itself, rather I
need to leave the actual file date unchanged when the Word macro saves it.
The macro is automatically altering hundreds of files in one go. By not
altering the file date, I can still sort my files in by date in Explorer.

Thanks again.

Jason
 
That's an operating system security issue, which, for good reason, you
shouldn't screw around with. There are probably API calls that will modify a
file's date; certainly there's nothing in VBA that will do it (since the
date is set by the operating system as a consequence of the macro saving the
file).
 
Back
Top