Run Macros in IDE with shortcuts
If you have not renamed a temporary macro, press Ctrl + Shift + P or select "Run temporarymacro" from the "macro" sub-menu on the "tool" menu to run it. However, even if you have renamed it, you can still access it with a shortcut key. Visual Studio. NET provides one or more key associations (or "bindings") to the shortcut key to call the macro method. When you press the key sequence, a macro is executed. The following procedure describes how to bind a macro to a shortcut key.
- Record the example in the macro. If it does not exist, you can use the following method to restore the text document to the previous state: Re-type the word "one" and add a space behind it, then press the Home Key to place the insert point at the beginning of the row.
- Select "options" on the "Tools" menu to display the "options" dialog box.
-
- In the "Environment" folder, click "keyboard ".
- In the "display command inclusion" box, type "macros ". All commands starting with "macros" will appear in the command list. (If the temporary macro name is not changed, it should be
Macros. mymacros. recordingmodule. temporarymacro
.)
- Scroll down the list to your Macro.
- Click the press shortcut box and type the key combination, for example, CTRL + Shift + ALT +. This is the shortcut key for executing the macro. If you want to, you can use different key order.
- Click Allocate, and then click OK ". Now the macro is bound to the shortcut key.
- Return to the text document and press Ctrl + Shift + ALT + A to call the macro.
From msdn -- Visual Studio macro: http://www.msdn.net/library/chs/default.asp? Url =/library/CHS/vsintro7/html/vxtskrunningmacros. asp