Saturday, 22 March 2014

how to record macro in visual studio

Just exploring how to record the macro in visual studio 2010 and open the recorded file and edit it as per need.
1.       Open VS;
2.       Press Ctrl + Shift + R (recording macro)
3.       Write down the text which you want to  see while run the macro;
4.       Than stop recording the macro text by;
5.       Open Macro explorer by tools à macros à macro explorer (alt + F8). It appears like below;
Here you can see the macros which you have created.
6.       To view the code of this macro rt click à Edit;
It will display like below; And you can customize it as of your need.
Like I customize it as Create by – Satya  Date as todays date  by datetime function.
7.       Now link it with any shortcut key
a.       Go to tools à options à Key board;
b.      Just type “macro” you will get all the list of macro; Select particular macro;
c.       Assign the key as below, and click assign and click OK.
Click assign should mandatory to assign the short cut key.
Note : Don’t give already using shortcut keys
d.      Now using that in any application with given shortcut key.

No comments:

Post a Comment


You will like to read it