Word provides two ways to create macros: the macro recorder and the "Visual Basic Editor".
Tools-Macro-
Start the macro recorder and record a series of operations to create a macro. You can also create a macro from scratch by entering Visual Basic for Applications code in the Visual Basic Editor. When recording a macro, you can click commands and options, but the macro recorder cannot record mouse movement in the document window.