views:

82

answers:

0

In Visual Studio 2008 I had a macro which would insert a snippet and input today's date in one of the replacements. When I try to run this macro in VS 2010 it doesn't work. No matter how I try it will not insert a snippet. When I try the following command:

DTE.ExecuteCommand("Edit.InvokeSnippetFromShortcut", "snippetName")

This fails with error "Error HRESULT E_FAIL has been returned from a call to a COM component.

I tried recording a new macro and when I pressed the keyboard shortcut for inserting a snippet (Ctrl+K, Ctrl+X) VS gave the error "The command Insert Snippet is not currently available."

Did MS remove the ability to insert snippets from macros? If so this really is a shame because macros have functionality not found in snippets and vice versa.