Is there a simple way to force a document to Collapse to Definitions on
open? The item in Options collapses the region blocks-- I want to collapse
one step further.
I tried writing a simple macro in the DocumentOpening event of the Macros
IDE. Unfortunately, it did nothing. My next change vaporizes the running
instance of VS.Net.
Can someone provide me the correct macro code to do this? Is there an easier
way to do it?

Signature
Thanks in advance,
Dave Veeneman
Chicago
Dave Veeneman - 19 May 2004 15:55 GMT
I finally got back to this issue, and here is what I did: Record a one-line
macro that makes a call to CollapseToDefinitions (select the item on the
Edit Menu). Then create a DocumentEvents_DocumentOpened event handler in the
Macro IDE (go to Macro Explorer, open the macro IDE, and select the
Environment Events module in My Macros). Create a
DocumentEvents_DocumentOpened handler and move the recorded call to
CollapseToDefinitions to the event handler. Documents will now collapse to
Definitions when they are opened.