Record your first macro

  1. Developer → Record Macro, name it, then perform your actions;
  2. Stop recording; the steps are saved as VBA;
  3. Developer → Macros to run it or bind it to a button.

Example: bold every heading

For Each p In ActiveDocument.Paragraphs
If p.Style = "Heading 2" Then p.Range.Bold = True
Next

Safety

Macros can carry malicious code: run only your own or trusted ones, and set macro security to disable unsigned macros.