A macro is a sequence of operations that Word can execute whenever you tell it to. Word’s powerful macro facilities enable you to automate just about anything you would do manually in Word. You can assign a macro to a keyboard shortcut, run it from the Macros dialog box, or place a button for it on the Quick Access toolbar (or anywhere else on the Ribbon).
You can create Word macros in two general ways:
Use Word’s macro recorder to capture the steps in your macro as you perform them in Word. After you save the macro, you can play it back at any time using one of the options listed previously.
Write the code of the macro ...