How to enumerate opened code windows (i.e. those windows where you edit documents) upon solution loading using macros?
As you probably know, MSVS remembers opened documents, i.e. when you load solution, IDE will load previously opened files. What I want to do is to perform some actions with those windows upon solution loading.
I tried to access these windows in SolutionEvents_Opened handler. But have no luck - it seems that mentioned windows are not available at the moment SolutionEvents_Opened invoked. DTE.Documents is empty and DTE.Windows.Items doesn't contain them.
I need some code like:
Private Sub SolutionEvents_Opened() Handles SolutionEvents.Opened
Dim window As Window = DTE.Documents.Item(?).Windows // one of the opened windows
...
End Sub