I’ve taken that macro that’s been passed around for years, and put it into a VS Addin.

The following links for the full VS Solution and the MSI installer

http://cicoria.com/downloads/VsAuto/CollapseProjectsSln.zip

http://cicoria.com/downloads/VsAuto/CollapseProjectsSetup7z.exe