How to Disable HTML Paragraph Auto-Spacing in Word for Mac
Question details
The user needs to disable the HTML paragraph auto-spacing compatibility setting in Word for Mac, which is missing from the application's user interface.
- Product
- Microsoft Word for Mac
- Device & OS
- macOS
- Scenario
- Adjusting advanced document compatibility settings to prevent unwanted paragraph spacing when working with HTML-related formatting.
- Observed behavior
- Word for Mac does not expose the 'Do not use HTML paragraph auto spacing' compatibility option anywhere in its standard interface or preferences menu.
Ensure you have the Developer tab enabled in Word for Mac's ribbon preferences to access the VBA editor, and save your document before running any scripts.
Use a VBA Macro to Disable HTML Auto-Spacing
Since the user interface lacks the toggle, you can use a short VBA script to modify the document's compatibility settings programmatically.
Word for Mac does not provide a visual interface for verifying or toggling this specific HTML compatibility setting. However, Visual Basic for Applications (VBA) allows you to bypass the UI limitations and directly adjust the document's backend properties.
Launch Word for Mac, open your target document, and press 'Option + F11', or go to the Developer tab and click 'Visual Basic'.
To disable the option for just the open document, insert a new module and paste this code: Sub TurnOffHTMLAutospacing() ActiveDocument.Compatibility(wdDontUseHTMLParagraphAutoSpacing) = True End Sub
To disable it for all future documents created from the template, use this code instead: Sub TurnOffHTMLAutospacing() ActiveDocument.AttachedTemplate.Compatibility(wdDontUseHTMLParagraphAutoSpacing) = True End Sub
Click the 'Run' button (the play icon) in the VBA Editor toolbar, or press 'F5' to execute the script and apply the spacing setting.
Use HTML Preformatted or Custom Paragraph Styles
If you prefer not to use VBA macros, you can approximate the spacing result by leveraging specific paragraph styles.
Experience Seamless Document Formatting with WPS Office for Mac
If you find Word for Mac's interface limiting or overly reliant on VBA macros for adjusting basic formatting and spacing settings, consider switching to WPS Office. It provides an intuitive interface with easily accessible paragraph controls.
- 1. Download and Install: Get WPS Office for Mac for free from the official website and install it on your device.
- 2. Open Your Documents: Open your existing .docx files directly in WPS Writer; no format conversion or importing steps are required.
- 3. Adjust Formatting Visually: Use the easily accessible Paragraph settings in the Home tab to finely control spacing without writing code.

Frequently Asked Questions
Why can't I find the HTML paragraph auto-spacing option in Word for Mac?
Unlike the Windows version of Word, Word for Mac has a more limited preferences menu and does not expose the 'Do not use HTML paragraph auto spacing' compatibility option. It remains hidden and must be toggled programmatically via VBA.
Will running the VBA macro affect other Word documents?
If you run the macro using 'ActiveDocument.Compatibility', it only applies to the currently open document. If you use 'ActiveDocument.AttachedTemplate.Compatibility', it modifies the underlying template (like Normal.dotm) and applies the setting to all new documents created from it.
Can I reverse the VBA macro if I want auto-spacing back?
Yes. You can reverse the effect by running the exact same VBA macro, but changing the end of the script from '= True' to '= False'. This restores the default HTML paragraph auto-spacing behavior.
Is there a way to verify if the compatibility setting was successfully applied?
There is no direct visual verification available in the Word for Mac interface. You can only confirm it by observing the paragraph spacing behavior in your document, or by writing a secondary macro to return a message box displaying the property's current True/False status.




