nealgs
asked on
Need to preserve a files last access and modified date/time using VB6
Hi all,
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Computron - thanks for the pointers, but already been there and tried them.
Didn't appear to work as last accessed date was still getting changed, but will try them again.
Gary
Didn't appear to work as last accessed date was still getting changed, but will try them again.
Gary
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.vbcity.com/forums/topic.asp?tid=106361