Create a Microsoft Word Quick Style for a Code Snippet Box
I've figured out how to do this:
- Highlight arbitrary text in the document
- In the Styles chunk of the ribbon, Save Selection as new Quick Style...
- In the Modify Style dialog, click Format at the bottom.
- Select Frame
- Set Text Wrapping to Around
- Click OK, then in the Format menu select Border
- In the Shading tab, pick a Fill with the background color, e.g. gray
For Office 2007 and 2010, you'll want to use the Shading tool:
That should do what you want.
I don't have an older version of Office handy to check, but you'll probably find the same tool under Format -> Paragraph, or similar menu option.
From Office 2013 there is a new quick style called 'Code'. You can disable spell-check by
Format->Language->Disable automatic spell-checking.