Welcome toWord.Tips.Net
Ask a Word Question
Make a Comment
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Standardizing Note Reference Placement
Selecting Printing of Color Pictures
Moving Rows and Columns With the Mouse
Robin is looking for a way to notify users, when a document is opened, as to whether there are any tracked changes in the document. This is not a standard feature of Word, but it can be added easily enough with an AutoOpen macro. If you want the macro to simply indicate whether Track Changes is turned on, you can use the following:
Sub AutoOpen()
If ActiveDocument.TrackRevisions = True Then
MsgBox "Track Changes is On."
End If
End Sub
Note that this macro doesn't let you know if there are actually any changes in the document, so it doesn't help in the situation where Track Changes is turned off, but unresolved changes from a previous editing session still exist. In that case, you need to expand the macro slightly.
Sub AutoOpen()
On Error Resume Next
If ActiveDocument.TrackRevisions = True Then
MsgBox "Track Changes is On"
With ActiveWindow.View
.ShowRevisionsAndComments = True
.RevisionsView = wdRevisionsViewFinal
End With
Exit Sub
End If
If ActiveDocument.Revisions.Count > 0 Then
MsgBox "Document contains revisions"
With ActiveWindow.View
.ShowRevisionsAndComments = True
.RevisionsView = wdRevisionsViewFinal
End With
Exit Sub
End If
End Sub
This version of the macro checks two conditions, displaying a message box if Track Changes is turned on and also displaying a message box if there are any changes existing in the document. In both cases, the macro also changes the view of the document so that changes are visible on-screen.
Tip #409 applies to Microsoft Word versions: 97 2000 2002 2003
Save Time! WordTips has been published weekly since early 1997. Past issues are available in convenient WordTips archives. Have your own enhanced archive of WordTips at your fingertips, available to use at any time!