First I found this blog post – which worked but only after some tinkering. There is a comment there that describes a better (simpler) solution, IMO. Step 1: Create the following macro, which simply toggles (twice) the existing TrackActivityinSolutionExpl... command – this is the same command that happens if you turn on solution explorer tracking in Visual Studio options, except here we’re turning it on and then immediately off: Public Sub SelectCurrentItemInSolution... DTE.ExecuteCommand("View.Tr... ......