PaulSchrum
Registered User.
- Local time
- Today, 03:56
- Joined
- Jul 30, 2011
- Messages
- 20
I need some advice.
In Access VBA, I want to create an application to do a kind of file check-out/check-in system. I want the file state (checked in, checked out) to be stored directly on the file in the file system. I do not want to use Lock exclussively because other users may have locked a file, so I want to lock each checked-out file, but return the file to the original Locked state at check-in time. This means I can't just lock it and say locking is the same as checking out.
The files may be of any kind, but especially .xlsx and .dgn.
I thought I had a brilliant idea when I thought up storing data in the file's Comments field. After a lot of research, I found
http://www.vbaexpress.com/kb/getarticle.php?kb_id=405#instr
which explains how to read various Properties from a file. I implemented that, but was really disappointed to find that all I can do is read the contents of Comments. I can't write to it.
So, now finally, my question:
Can anyone suggest a way to write string data to a file which will allow me to persist my own meta data, something like: "PrevState:NotLocked; CheckoutState:CheckedOut;User:someUserName"
?
I have also thought about creating a hidden file in any directory with a checked-out file. It would be a text file with the filename of the checked out files of that directory plus the other data. This approach is not preferable because the data is not attached to the file. It is not preferable, but it is my fallback in case what I am wanting to do turns out not to be possible.
Suggestions on how to implement check-out at file level?
Also, if anyone knows how to write values to Comments in VBA, that would solve my problem.
Thanks.
In Access VBA, I want to create an application to do a kind of file check-out/check-in system. I want the file state (checked in, checked out) to be stored directly on the file in the file system. I do not want to use Lock exclussively because other users may have locked a file, so I want to lock each checked-out file, but return the file to the original Locked state at check-in time. This means I can't just lock it and say locking is the same as checking out.
The files may be of any kind, but especially .xlsx and .dgn.
I thought I had a brilliant idea when I thought up storing data in the file's Comments field. After a lot of research, I found
http://www.vbaexpress.com/kb/getarticle.php?kb_id=405#instr
which explains how to read various Properties from a file. I implemented that, but was really disappointed to find that all I can do is read the contents of Comments. I can't write to it.

So, now finally, my question:
Can anyone suggest a way to write string data to a file which will allow me to persist my own meta data, something like: "PrevState:NotLocked; CheckoutState:CheckedOut;User:someUserName"
?
I have also thought about creating a hidden file in any directory with a checked-out file. It would be a text file with the filename of the checked out files of that directory plus the other data. This approach is not preferable because the data is not attached to the file. It is not preferable, but it is my fallback in case what I am wanting to do turns out not to be possible.
Suggestions on how to implement check-out at file level?
Also, if anyone knows how to write values to Comments in VBA, that would solve my problem.
Thanks.