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?
Word – Create a Microsoft Word Quick Style for a Code Snippet Box
formattingmicrosoft word
Related Solutions
Styles were a big breakthrough in efficient document production in the early versions of Word, but it has gotten so complicated as to be more trouble than it is worth for most users.
In the style definition, there is a setting for "Style Based On" and one for "Style Type" -
Here you see two default styles built-in to Word 2007. Both have the font color set to blue. Here is the results of applying those styles to text where words have been individually colored:
As you can see, when the "Style Type" is "Linked" and "Style based on" is set to the Normal paragraph style, the color attribute of the style does not override any individual word colors. "Style Type" set to Character and "Style Based On" set to Default Paragraph Font DOES override individual colors.
When you define your own style you'll have choices for "Style Type" as shown here:
You should be able to get what you want by choosing Linked for "Style Type" and Normal for "Style Based On" in the style definition.
The reason why Set As Default...
is greyed out when accessing the font dialogue box through the 'font' option in Define New Bullet
is because the same font dialogue box is used for this function, and also if you were to bring up the font dialogue box without going via the 'bullets' option first.
Put simply: the same dialogue box is used in both instances; the only difference is that if you access the font dialogue box via the bullets option, it is assumed that you do not wish to make any changes to the actual font settings of your document other than those which will affect the bullets, hence why it is greyed out.
To confirm this, if you bring up the font dialogue box directly Ctrl + D
, you will notice that the Set As Default...
button in the lower left hand corner is fully clickable and is not greyed out. This is because you have accessed it directly, which implies that you wish to make changes to the font style within the document itself (not specifically for the bullet-type) and thus provides the option to even change the default font for all future documents.
Furthermore, if you wish to define a pre-defined set of bullets to use across particular Word templates - Normal.dot
/Normal.dotm
included - then my advice would be to set the bullets to precisely how you want them to look and function, and then set the template to be used across the Normal.dot
/Normal.dotm
template. This means that any future templates that you wish to create will have access to the newly-defined bullet styles and will make the task of creating separate templates much smoother as the resources are all readily available.
To achieve this, perform the following steps (MS Word 2010):
- Select the 'Developer' tab. (If this is not visible, then follow these steps);
- Select 'Schema';
- Towards the lower left-hand corner of the 'Schema' window, select 'Organizer...'. This will now bring up a list of all styles active in the current document, and all available styles in the
Normal.dot
/Normal.dotm
template. - Select your newly-created style from the left-hand pane and click 'Copy' to copy it across to the
Normal.dot
/Normal.dotm
template.
From here, you may create new templates which will all have access to the new bullet styles with minimal fuss.
Hope this helps.
Best Answer
I've figured out how to do this: