Need to preserve a files last access and modified date/time using VB6
Posted on 2006-03-25
I need to be able to open word and excel docs from a VB6 app, but once finished with the docs, the last access and last modified dates/times need to be reset to what they were before they were opened by the application.
This used to be easy in DOS/Win16 days but everytime i attempt to retrieve a files last accessed date, the last accessed data is changed to the current time (as in the file has just been opened to retrieve the last accessed info, so the system updates the last accessed info on the file)
How on earth do you do it. I'm using createfile etc without any luck.
The app will be used on 100's of word/excel docs so need to keep date/times.