run macro/code on document switch

I'm trying to run a macro/code when the user clicks or switches between open documents...it would run when I click on a document tab at top.  Here is code that works when the user clicks in the workspace:

 

Private Sub GlobalMacroStorage_WindowDeactivate(ByVal Doc As Document, ByVal Window As Window)
    ScaleApps.ScaleCaption
End Sub

 

So, I imagine it will look something like this where the 'Windwo...' section is...but what is it?