You applied a restricted style template in Word to enforce consistent formatting across your document, but you or your colleagues can still apply bold, change font sizes, or add colors directly to text. This happens because style restrictions in a template do not block direct formatting by default — they only limit which styles appear in the Styles pane and prevent users from modifying those styles. This article explains why direct formatting overrides a restricted style template, how the underlying permission model works, and how to enforce strict formatting control using Group Policy or a macro-enabled template.
Key Takeaways: Direct Formatting Override in Restricted Style Templates
- File > Options > Trust Center > Trust Center Settings > Protected View: Disabling Protected View does not affect style enforcement — the override is a feature of the style restriction model, not a security setting.
- Developer tab > Document Template > Automatically update document styles: When unchecked, changes to the attached template do not propagate to the document, but direct formatting still overrides style definitions.
- Group Policy Administrative Templates > Word 2016 > Disable Direct Formatting: This policy removes the ability to apply direct formatting entirely, forcing all formatting through styles only.
How Word Style Restrictions Work and Why Direct Formatting Bypasses Them
Word style restrictions are part of the Restrict Editing feature, which you access via Review > Restrict Editing. When you check Limit formatting to a selection of styles and click Settings, you choose which styles are available. Users can only apply those styles — they cannot create new styles or modify existing ones. However, this restriction does not block the direct formatting buttons on the Home tab: Bold, Italic, Font Size, Font Color, Highlight, and so on.
The root cause is that Word treats style-based formatting and direct formatting as two independent layers. A style defines a set of formatting attributes. Direct formatting is an override that sits on top of the style layer. Even if a style is locked, direct formatting can still be applied to any text. Word does not check whether direct formatting conflicts with the style definition. It simply applies the direct formatting as an additional property.
Microsoft designed this behavior intentionally. Style restrictions target the structure of formatting — which styles exist and how they are defined — not the ad hoc formatting users apply. In many business scenarios, users need occasional bold or italic without creating a new style. Word allows this flexibility by default. If your organization requires strict formatting enforcement, you must combine style restrictions with additional measures such as disabling direct formatting via Group Policy or using a macro that strips direct formatting on save.
What Style Restrictions Actually Block
When you enable Limit formatting to a selection of styles, the following actions become unavailable:
- Applying any style not in the approved list
- Modifying an existing style (the Modify button in the Styles pane is grayed out)
- Creating a new style (the New Style button is disabled)
- Using the Style Inspector to change style definitions
The following actions remain available:
- Applying Bold, Italic, Underline, Strike-through, Subscript, Superscript
- Changing font name, size, color, and highlight
- Adjusting paragraph alignment, indentation, spacing, and borders
- Using Format Painter to copy direct formatting from one selection to another
This list makes it clear that style restrictions alone cannot enforce a uniform look. Users can still make text red, change the font to Arial Black, or add paragraph borders — all without touching a style.
Steps to Prevent Direct Formatting Override in a Restricted Style Template
To block direct formatting entirely, use one of the following methods. The first method uses Group Policy and is suitable for enterprise environments. The second method uses a macro and works for individual documents or templates.
Method 1: Disable Direct Formatting via Group Policy
Group Policy applies to all users on a managed network. This method removes the direct formatting buttons from the ribbon and keyboard shortcuts.
- Open the Group Policy Management Console
On a domain controller or management workstation, rungpmc.msc. Navigate to the organizational unit (OU) containing the target users. - Create or edit a Group Policy Object (GPO)
Right-click the OU and select Create a GPO in this domain, and Link it here. Name it something like “Word Formatting Restrictions.” - Navigate to the Word Administrative Template
In the GPO editor, go to User Configuration > Policies > Administrative Templates > Microsoft Word 2016 > Word Options > Disable Items in User Interface. (The path may vary slightly if you use a different Word version template.) - Enable the policy “Disable direct formatting”
Double-click Disable direct formatting, select Enabled, and click OK. This policy removes the Font group from the Home tab, disables the Font dialog (Ctrl+D), and blocks keyboard shortcuts for bold, italic, underline, and font size changes. - Force a Group Policy update on client computers
On each client, rungpupdate /forcefrom an elevated command prompt, or wait for the automatic refresh cycle.
After this policy is applied, users can only format text by applying a style from the approved list. Direct formatting buttons do not appear, and keyboard shortcuts produce no effect.
Method 2: Use a Macro to Strip Direct Formatting on Save
If you cannot deploy Group Policy, attach a macro to the document or template that removes direct formatting every time the document is saved. This method does not prevent users from applying direct formatting during editing, but it cleans up the document automatically.
- Open the Visual Basic for Applications editor
Press Alt+F11 in Word. In the left pane, double-click ThisDocument under the project for your template or document. - Paste the macro code
Insert the following code into the code window:Private Sub Document_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim doc As Document Set doc = ActiveDocument doc.ConvertToStyles End SubThis macro calls the
ConvertToStylesmethod, which removes direct formatting and applies the underlying style formatting to all text. - Save the template or document as macro-enabled
Go to File > Save As. Choose Word Macro-Enabled Template (dotm) for a template or Word Macro-Enabled Document (docm) for a document. - Test the macro
Apply some direct formatting to text, then save the document (Ctrl+S). The direct formatting should disappear, and all text should match its assigned style.
Note that ConvertToStyles works on the entire document. If you have text with intentional direct formatting that you want to keep, this macro is not suitable. In that case, you need a more selective macro that only removes direct formatting from specific style ranges.
If Direct Formatting Still Appears After Restrictions
Users Copy and Paste Text From Other Sources
When users paste content from a web browser, email, or another document, Word often keeps the source formatting. This introduces direct formatting that bypasses style restrictions. To fix this, instruct users to use Paste Special > Unformatted Text or set the default paste option to Keep Text Only in File > Options > Advanced > Cut, copy, and paste.
The Restricted Style Template Is Not Attached to the Document
If the document uses a different template, the style restrictions from your template do not apply. Verify the attached template by going to Developer > Document Template. The Document template field should show your restricted template path. If it is blank or shows a different template, click Attach and select your template. Check Automatically update document styles to apply the style definitions.
Users Can Still Apply Styles From the Quick Styles Gallery
The Quick Styles gallery on the Home tab shows a subset of styles. If you want to limit users to only the styles you specify, you must configure the Recommended list in the Manage Styles dialog. In the Styles pane, click Manage Styles (the third icon at the bottom). On the Recommend tab, select each style you want to hide, then click Hide. Only recommended styles appear in the gallery and the Styles pane.
Style Restriction Only vs Style Restriction Plus Direct Formatting Block: Comparison
| Item | Style Restriction Only | Style Restriction + Direct Formatting Block |
|---|---|---|
| Bold, Italic, Underline | Allowed | Blocked |
| Font Color and Highlight | Allowed | Blocked |
| Font Size and Font Name | Allowed | Blocked |
| Paragraph Alignment and Spacing | Allowed | Blocked |
| Apply Non-Approved Style | Blocked | Blocked |
| Modify Existing Style | Blocked | Blocked |
| Create New Style | Blocked | Blocked |
Style restriction alone blocks only style-level actions. Adding a direct formatting block (via Group Policy or a macro) closes the remaining gap and enforces complete formatting consistency.
You can now control both style-level and direct formatting in your Word documents. If you manage a fleet of computers, deploy the Group Policy setting Disable direct formatting to remove the problem at the source. For individual documents, attach the ConvertToStyles macro to automatically clean up direct formatting on save. To further tighten control, hide non-essential styles in the Manage Styles dialog so users see only the styles they are allowed to use.