private void Application_WindowDeactivate(Word.Document Doc, Word.Window Wn) { // for User Testing startSwitchTime = DateTime.Now; // The following 3 lines are used to ensure that the Microsoft Word main // window is set as the main focus, instead of the child forms/window. autoCompleteForm.Hide(); notificationForm.Hide(); extendSuggestionForm.Hide(); }