Your extension will be available shortly on the Visual Studio Marketplace at this link.

Macros for Visual Studio

Microsoft DevLabs Free

An extension for Visual Studio that enables the use of macros in the IDE. The extension can record most of the features in Visual Studio including text editing operations.

2.8 Star
Visual Studio
2017, 2015, 2013
Download (24,019)
E-mail Twitter Digg Facebook
Add to favorites
Sign in to write a review
Sort by:

1 Star
by Bob Bryan | November 05 2016

Tried to add a macro to duplicate a line the cursor is on. After recording the keystrokes, tried to save it to a custom hotkey. It brings up the keyboard mapping dialog ok, but there is no way to specify the macro name in this dialog. So in effect, there is no way to assign a custom hotkey to a macro. That was the first problem.

The 2nd problem is when I first tried to run the macro. It locked up the keyboard. I had to use task manager to kill VS. When I restarted VS, the macro was there and appeared to run ok. But, with the issues I decided to remove the plug-in because of the other issues that others have reported. The thing is too dangerous right now and I don't want to lose work.

1 Star
by Mark A. Benningfield | November 02 2016

Was this pig even tested AT ALL???

4-line macro to add a curly brace at the beginning and end of a line;

Shortcut assignment dialog has a button to assign a custom shortcut, but there's
no way to find the macro in the command list for keyboard shortcuts.

So, picked the first preset shortcut, fired it up, and a modal loop locks up my
keyboard, have to restart VS.

This is embarrassing.

5 Star
by maroonedsia2 | September 23 2016

1 Star
by James.Cooke | September 02 2016

Doing simple copy/pastes on VS2015, after about 20 operations this extension causes my VS to freeze and I have to use task manager to end process. I lost work. Multiple times. Sorry - this gets a full thumbs down. Windows 7, 64 bit. Oh look - after about 5 minutes it unfroze and resumed. dammit, why can't we find a text macro that actually works, *with* copy/paste support???

5 Star
by MarcelLambacher | September 02 2016

4 Star
by Michael Kilburn | August 30 2016

I manged to convince it to work. Macro.InsertText() is broken (loses random symbols occasionally) -- use dte.ActiveDocument.Selection.Insert().

1 Star
by gwenzek | August 03 2016

2 Star
by Richard Mortensen | July 09 2016

When multiple copies of visual studio are running (ex: 2 different solutions), I'll run a macro in solution1, and it will execute in the other solution2 (the visual studio sitting in the background).
I love this capability - but a show stopping bug.

4 Star
by aerosign | June 23 2016

Like others I couldn't get it to work. It forgot key presses and invented new ones.... It seems to be related with Resharper. If you just go to Tools->Resharper and disable it while using macros it will start work. At least that is my experience.

1 Star
by Doug Kent | June 22 2016

This extension is unusable for me.

Ctrl-M + Enter does nothing half the time.

Certain keystrokes aren't recorded at all. The latest is ':' which shows up on replay as a space. Arrow keys are often not recorded.

Really gets confused when intellisense and auto-complete is happening during recording.

I'm using VS 2015 Pro with Resharper installed, if that makes any difference.

5 Star
by SeongTae Jeong | May 24 2016


You can migrate VS2013 macro settings by copying files from




5 Star
by metin_sql_hotmail | May 24 2016

Thank you

simple, fast and practical

5 Star
by Justin Clareburt (MSFT) | May 20 2016

PTraill: Thanks for your suggestion. We've now added keyboard accelerators for all the menu items. It certainly makes it much easier to use now. :-)
Note: Due to conflicts with Outlining shortcuts (Ctrl-M, P), we've changed the Playback key binding to [Ctrl-M, Enter]

SeaBreeze007: Thanks for the information. I've created an issue on GitHub for tracking this.

felixcollins: Thanks. We are now tracking this issue on GitHub:
Hopefully we'll have a fix out soon.
**Update: This issue is fixed in version 1.2.0

Franz_x: Thanks. I've opened an issue on GitHub to track this one.

1 Star
by felixcollins | May 13 2016

I could not stop recording.....

I got the error...
"Could not find a part of the path.... etc"

I created the missing directory and file. Still no joy. So I tried the menu command "Macro Explorer". Suddenly some extra files appeared in the directory. Now I can stop recording.

Poor showing from the dev and test team to let such beginner mistakes through.

5 Star
by SeaBreeze007 | May 12 2016

Brilliant, thanks for updating this to VS 2015.
JavaScript macros can be crafted and saved to:
But do not bother editing the sample macros as they get reverted on
VS restart!
If you need to modify one, copy it to the path above, and edit it there.

1 Star
by | May 12 2016

Doesn't work.---------------------------Microsoft Visual Studio---------------------------Could not find a part of the path 'C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\14.0\Macros\Macros\Current.js'.---------------------------确[9A ---------------------------

1 Star
by Franz_x | February 05 2016

Very first use of the recorder gets me stuck with this message:
Object reference not set to an instance of an object.
Recorder does not stop when clicking on 'Stop Recording'. Just shows the above message.

3 Star
by David347 | October 07 2015

Thanks for contacting me today Cathy,
I opted to use
because I only needed Ctrl-Shift-R and Ctrl-Shift-P

3 Star
by PTraill | October 07 2015

The key combination Ctrl-M, P is also assigned to Stop Outlining, which is tedious.

A minor point (once the key assignments are usable) is that menu.Tools.Macros does not have a keyboard accelerator, and is not chosen on Alt-T,M.

Otherwise it looks usable.

5 Star
by Henrik Dahl | October 07 2015

Is there also a version for VS 2015?

1 - 20 of 40 Items   
Sign in to start a discussion

  • Recording can't be stopped
    3 Posts | Last post May 13, 2016
    • Very first use of the recorder gets me stuck with this message:
      Object reference not set to an instance of an object.
      Recorder does not stop when clicking on 'Stop Recording'. Just shows the above message.
      Obviously a trainee created this piece of code...
    • Hi Franz. Thanks for the information. I've created a bug issue on the open-source GitHub repo:
    • My workaround...
      1. Create the missing folder and file.
      2. Click the "Macro Explorer" menu command.
      3. Now try stopping recording.
  • Support for VS2012/VS2015?
    3 Posts | Last post May 12, 2016
    • Is VS2015 and VS2012 also supported?
      Would be great.
    • Add me to the list of those who would like to see support for VS2012... since that is the latest version we're currently using.
    • We've upgraded the extension to work with VS2015 as well as VS2013.
      There are no plans to provide support for VS2012.
  • Get specific version from TFS macro
    2 Posts | Last post May 12, 2016
    • Hi, im trying to create macro that will
      1. Right click item in Source Control Explorer (left side tree)
      2. Select 'Advanced'
      3. Select 'Get specific version'
      4. Check both 'Override...' check boxes in the 'Get' dialog that is shown
      5. Click 'Get' button
      It seems that the macro recorder cannot record actions that i make in the dialog: dialog is shown but nothing happens - it seems that the macro is wating for me to make the choices.
      Any way to do this other way? I have the (bad) habit of taking always the specific version because i think VS do not take sometimes latest if he thinks latest is already loaded.
    • Sorry. Recording interactions with dialogs is not currently supported. But I'm sure it would be a useful feature!
      Feel free to create an issue for a proposed enhancement in the open-source GitHub repo.
  • Support for VS2010 VBA Macros
    2 Posts | Last post May 12, 2016
    • Could VBA like in the legacy VS2010 Macros also be supported, so the old macros can be reused?
    • Sorry. We've moved to a JavaScript model now.
  • Visual Studio 2015
    2 Posts | Last post May 12, 2016
    • Any planned support for Visual Studio 2015?
    • We've upgraded this extension to install on VS2015 (and VS2013).
      It is also open-sourced now.
      Hope that helps.
  • Request of support for Visual Studio 2015
    2 Posts | Last post May 12, 2016
    • I'd like to see this extension in Visual Studio 2015. :)
    • Done. You can now install this extension with VS2015 (as well as VS2013).
  • Thanks for the extension
    2 Posts | Last post May 12, 2016
    • Thanks for the macros extension, really appreciate having this feature back in VS.  Can we reference standard .net assemblies like in the old macros?  
      Is the project opensourced at all so we can help? 
      Thanks for all your efforts.
    • Hi Tollo
      We have open-sourced the extension now. Contributions welcome! :-)
  • Update this for VS 2015
    8 Posts | Last post May 12, 2016
    • Hi! Please, update this for support VS 2015, because the Text Macros for Visual Studio 2012/2013/2015 doesn't have Macro Explorer....
      Thanks a lot!
    • Like all others whom voiced on request for VS 2015, I too would appreciate the support for VS 2015, for it comes in quite handy at times on repetitive work (rarely, but needed, commonly to edit XML or other data).  I dislike opening up Notepad++ just to do Macros and switch back to VS 2015 when needed.
    • Yes, please add this to VS 2015.
      We recently upgrade from 2010 to 2015, and have now lost Macro facilities - even though 2013 does have it.
    • Any plans to port it to VS 2015?
    • Another vote for 2015! 
      I've gone from lots of macros at VS2010 converted them for js on 2013 and now what?
    • Please parse to VS2015 or at least make it possible to compile a VS2015 version by open up source code.
    • Hi, I am also interested in the VS 2015 version of the macros extension.
      I use it to had comment in the code especially the date of the change and it is very important for me.
      I transfer the VBA macro from VS 2010 to JS macro for VS 2013. Now I am going to VS 2015, so please update or give us the source code in order to compil it.
      Many Thanks
    • Done. This extension can now be installed on VS2015.
      The source code is also available on GitHub:
  • Javascript Builtins: Loging & Popups
    1 Posts | Last post October 09, 2015
    • It seems that javascript built-ins like the console and alert are not supported?  This makes debugging extremely challenging, and also really limits what is possible with this extension.  Is there a way to access them?
  • Reference of a custom JS or .NET library
    1 Posts | Last post September 24, 2015
    • Hi, thank you for great extension.
      Can I use my custom js-files with some logic?
      I create custom file
      var helper = new function () {
      	this.Attach = new function (processName, processOwner) {
                    //some logic
      and add reference like this
      /// <reference path="C:\Users\Ihar_Maiseyeu\AppData\Local\Microsoft\VisualStudio\12.0\Macros\helper.js" />
      use in my macros
      helper.Attach("asdas", "asdasd");
      but it doesn't work. I have an error message "helper is undefined"
21 - 30 of 35 Items