To use the macro code you find here you'll want to copy it to the clipboard and follow these steps.
Getting the macro into Visual Studio .Net
- Open Visual Studio .Net
- Use the menu to view Tools->Macros->Macro Explorer or Alt-F8 with most profiles.
- Right click to create a new macro project or open an existing module for editing.
- Paste the macro code you had in the clipboard into the module
Using the Macro
- Open the Macro Explorer
- Browse into the Module that contains your macro. You should also have a bunch of sample macros installed by default.
- Double click on the macro you want to run.
- or create a menu item and key combination for your macro by....
Putting a Macro on a Menu or Command Bar
- Open Tools->Customize.
- Switch to the Commands tab.
- In the categories pane select macros.
- Drag the macro onto a menu or command bar.
- Once it is on a menu or command bar you can highlight it (with the Customize dialog still open)
- Click “Modify Selection“.
- From here you can Change the name or button image that goes with it.
Creating a Keybinding for your Macro
- Open Tools->Options->Environment->Keyboard.
- Enter your macro name in the “Show Commands Containing“ textbox.
- Put the cursor in the “Press Shortcut Key(s)“ textbox.
- Enter your key a key combination.