title: Microsoft Project Application.ProjectAfterClose Event
body: <p>I'm writing add-ins for Microsoft Project.  Some of my toolbar buttons are only valid when a Project file is open, and I want to enable/disable them dynamically.  Typically I'd watch for files to be opened or closed, then check the count of the open files.  However, MS Project's API only has an Application.ProjectBeforeClose Event, and not a ProjectAfterClose event.  The ProjectBeforeClose event fires before the user is prompted to save any changes, at which point they can cancel the close, and no additional event fires.</p>
  
  <p>There's also WindowActivate and WindowDeactivate events, but the Deactivate only fires when switching to a different window, not on close.</p>
  
  <p>Has anyone found an elegant solution to simulate the ProjectAfterClose event?  Or more specifically, to enable/disable functionality based on whether or not a project file is open?</p>
  
  <p>Thanks,
  Thomas</p>