DocumentChange Event Example

This example arranges all open windows when the document focus changes.

Private Sub myApp_DocumentChange()
    Application.Windows.Arrange wdTiled
End Sub