VB.NET Code:
Private _word As Word.Application ... ' Get or create Word application object _word = ... AddHandler _word.DocumentBeforeSave, AddressOf DocumentBeforeSave ... Private Sub DocumentBeforeSave(Doc As Word.Document, ByRef SaveAsUI As Boolean, ByRef Cancel As Boolean) Debug.Print(Doc.Name) Cancel = False End Sub




Reply With Quote