Word Documents

Rev Simon Rumble simon at rumble.net
Wed Dec 7 09:58:51 GMT 2005

On 6/12/2005, "Sam Smith" <S at msmith.net> wrote:

>Does anyone know if there's a way to tell, from perl (on
>Unix) whether a word document has track changes turned on?

Highly highly highly unlikely.  There might be a way to get to that
information from VBA (which, if running on Win32, you could wrap into
something useful), but I don't remember there being any way.  You best
bet if you can't get VBA would be to check out the various MS Word
decoder tools out there.

For VBA, there is a property TrackRevisions.  Here's the help on it:

TrackRevisions Property

True if changes are tracked in the specified document. Read/write Boolean.

TrackRevisions Property Example

This example sets the active document so that it tracks changes and makes
them visible on the screen.

With ActiveDocument
    .TrackRevisions = True
    .ShowRevisions = True
End With

This example inserts text if change tracking isn't enabled.

If ActiveDocument.TrackRevisions = False Then
    Selection.InsertBefore "new text"
End If

More information about the london.pm mailing list