WindowDeactivate Event Example

This example minimizes any document window when it's deactivated.

Private Sub App_WindowDeactivate _
        (ByVal Wn As Word.Window)
    Wn.WindowState = wdWindowStateMinimize
End Sub