• Audit History for MS Word

    Author
    Topic
    #357156

    I have to send documents to several different people for input and revisions and I would like to track certain pieces of information for an audit trail. The things that I am interested in tracking are amount of time the document was open for editing, when it was last printed, how frequently it was printed, the name of the person who edited the document, etc…

    Is it possible to create a VBA solution that can create a log like this and keep all of the information attached within the original word file? I do not wish to create a separate log file that must be included with the document. If it is possible, can someone point me in the right direction?

    I am using word 2000, with no service release.

    Thanks,

    Viewing 1 reply thread
    Author
    Replies
    • #530099

      Yes its possible. Word automatically tracks how long the file has been open for editing (and resets when a SaveAs is done) in the File|Properties|Statistics and also tracks the last five users to edit the file (Do an Open with the file type set to ‘Recover Text from File’). The other attributes would best be added as document properties and incremented by hijacking the relevant commands.

      You would need to distribute the file with the macros to get your additional information tracked and so rely on the author allowing the macros to run. (You can bypass this if the attached template is already accepted into the fold)

    • #530132

      > Is it possible to create a VBA solution that can create a log like thi

      Yes it is, but don’t rely on things like “Total Editing Time” or any of the built-in doo-dads. They only show totals that become effective if the document is saved after editing. Open a document, play with it for an hour, close without saving changes and that hour doesn’t count.

      Instead with a couple of macros to execute on Open and on Save/Close you can trap the real time spent and record that s commented lines of code in a code module within the document. (If you’ve never seen this, in Word start recording a macro but elect to save it in the document rather than in the attached template; do a bit of stuff, stop recording, open VBE and inspect the modules of your document.)

      Once you have data stored in a data module in the document, you can have another macro that extracts the data and makes use of it.

      I use a similar technique for my spell-checker, choosing to keep “known words” in the document’s modules rather than entrust them to MSoft.

    Viewing 1 reply thread
    Reply To: Audit History for MS Word

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: