Once again, a problem with DTE.ExecuteCommand. This time it's the most plain vanilla context - just sitting in the text edit.
Here's the recorded macro -
Sub TemporaryMacro()
DTE.ExecuteCommand("Edit.GoToDefinition")
End Sub
This macro corresponds to the keystroke F12 in the editor, editing a C++ file.
I've seen reports of this in VS2005, claims to be fixed in VS2008 (though the poster claims to be able to repeat the error in VS2008), and a post in which the explanation was the operation was invalid during a build. None of the applies here.
VS2010 Pro, SP1, Windows 7 Pro SP1 64bit