I absolutely hate and despise working for free for Microsoft, given how after all those billions of dollars they STILL do not to have proper guides about stuff like this with screenshots on their damn website.
Anyways, here is a quick guide in Word 2010, using Notepad++ for syntax coloring, and a TextBox which can be captioned:
- Choose Insert / Text Box / Simple Text Box

- A default text box is inserted

- Switch to NPP, choose the language for syntax coloring of your code, go to Plugins / NPPExport / Copy RTF to clipboard

- Switch back to word, and paste into the text box – it may be too small …

- … so you may have to change its size

- Having selected the text box, right-click on it, then choose Insert Caption …

- In the Caption menu, if you don’t have one already, click New Label, and set the new label to “Code”, click OK …

- … then in the Caption dialog, switch the label to Code, and hit OK

- Finally, type your caption in the newly created caption box
