53.4. How to Record a Macro

When it comes to macros, one of the very cool features of Microsoft products is the capability of recording a macro with a macro recorder without having any knowledge of programming. The macro recorder records whatever you do in an IDE and then generates all the necessary programming code for you to use it.

Visual Studio has a built-in macro recorder as well. Even though we can be almost sure that users of Visual Studio IDE are technical developers, this recorder is still helpful for two reasons:

  • It can help a developer build a macro in less time rather than spending his or her time on writing programming code.

  • With the macro recorder you can generate an initial code for your macro, then start developing your macro based on this existing code. This is a common technique among developers to save the time and energy it would take to write all the code.

Using the macro recorder is easy. You need to open the Visual Studio IDE, then navigate to Tools Macros Record TemporaryMacro or simply press Ctrl+Shift+R to start recording a macro. Then do whatever you like in the IDE such as opening items, windows, or menus, and many other common tasks.

When you open the macro recorder a window appears in the IDE to let you work with the macro recorder and pause, stop, ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.