I found this code on the internet:
[VBA]
Sub FileClose()

NewCloseDialog

End Sub

Sub DocClose()

NewCloseDialog


End Sub

Sub NewCloseDialog()

On Error GoTo Error

If ActiveDocument.Saved = False Then
SureCloseDialog.Show

Else:

ActiveDocument.Close

End If

Exit Sub

Error:

MsgBox ("Something went wrong.")

End Sub

[/VBA]

This is really handy. But it only works when you click on: Office-Button>Close. How can I add a function to it that it always happens when you try to close the file????
P.S. I am a noob, so I need well explanation... Not: Oh, you need to add an close.Dialog If function on the third acudelir..