Instructions
Open World of Warcraft and start a game.
Click on the "Talk" button and select "Macro." A new dialog box will open.
Click on "New." Enter a name for the macro. Select an icon for the macro. Click "OK."
Highlight the icon you just created and click inside the "Enter Macro Commands" box.
Type a "/" and the name of the action you wish your macro to perform. There is a comprehensive list of prescripted macros in the Official World of Warcraft wiki to get you started (see Resource). For example a macro command that reads "/y Hooray, I made a macro!" will trigger your character to yell "Hooray, I made a macro!" when the macro icon is pressed in the game environment.
Click on the macro icon, and drag it onto a free slot on your "Action bar." The macro animation is now mounted and ready for use.
Press the number associated with the slot on your "Action bar" to activate the macro animation in the game.