Welcome toWord.Tips.Net
Ask a Word Question
Make a Comment
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Printing On Both Sides of the Paper
Turning Off AutoComplete for Dates
Understanding Auto Line Spacing
Adding Comments to Your Document
Conditional Calculations in Word
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
Find and Replace Almost Anything! An invaluable resource for learning how to harness the full power of Word's search and replace capabilities. You'll discover everything you need in order to master all the intricacies of finding and replacing elements of your document, including the super-powerful "wildcard searches" available in Word.