Before Save

This event is raised when the document is saved. The BeforeSave event handler enables you to take action when a user saves the document. For example, you might want to ensure that Track Changes is turned on whenever the document is saved, as shown in Listing 6.38.

Listing 6.38. Ensuring that Track Changes is turned on each time a document is saved

Private Sub ThisDocument_BeforeSave(ByVal sender As Object, _ ByVal e As Microsoft.Office.Tools.Word.SaveEventArgs) _ Handles Me.BeforeSave

Me.TrackRevisions = True

0 0

Post a comment