gmayor

I know your addin - it's great.Your is very user friendly with GUI, pop-ups and so on. I would like to have a macro to suit my needs - with almost no pop ups and son on.

Quote Originally Posted by SamT View Post
Does this apply to
  1. All Documents
  2. Documents of a certain Template
  3. Only certain Documents


In any case the code must be in a Class Module
If 1 , then it must be in Normal.dot
If 2, it must be in the Templae
If 3, it must be in the Document itself.
It seems that it applies to all document. The code is in normal.dot in Microsoft Word Object -> ThisDocument. For a starter, I would like to deal with a dialog when I close Word which shows if I want to save or not a document or to cancel. My macro fails to show a msgbox when I choose "Cancel". Could you help me with this? Your first reply was to complicated for me - I am really newbie in VBA.

Private Sub DocumentBeforeSave()

    With ActiveDocument
        If Application.Dialogs(wdDialogFileSaveAs).Show = 0 Then
            MsgBox "The Cancel button."
        End If

End With
End Sub