Word – Create a Microsoft Word Quick Style for a Code Snippet Box

formattingmicrosoft word

I'm trying to format some text in my Word doc to have a background color of gray. This is for me to have a Quick Style to apply this formatting. I want to use a monospaced font, like Consolas, and have the entire block have a gray background. When I highlight text and set the background color though, it only set the color behind the text, not the area rectangular area the text sits on within the doc layout. How can I do this?

Best Answer

I've figured out how to do this:

  1. Highlight arbitrary text in the document
  2. In the Styles chunk of the ribbon, Save Selection as new Quick Style...
  3. In the Modify Style dialog, click Format at the bottom.
  4. Select Frame
  5. Set Text Wrapping to Around
  6. Click OK, then in the Format menu select Border
  7. In the Shading tab, pick a Fill with the background color, e.g. gray
Related Question