How to Change Word Styles and Following-Paragraph Styles in Bulk
Question details
The user wants to automate the process of changing the 'Base Style' and 'Style for following paragraph' of multiple Word document styles from 'Normal' to 'Body Text'.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A user needs to restructure the style hierarchy in a document or template, ensuring that paragraph styles inherit from and flow into 'Body Text' instead of 'Normal'.
- Observed behavior
- Manually updating the BaseStyle and NextParagraphStyle for dozens of styles is highly time-consuming, requiring a programmatic solution to execute a bulk update.
Before running a macro that modifies styles globally, especially in your Normal template (Normal.dotm), create a backup copy of the template file to prevent unintended permanent changes to your future documents.
Use a VBA Macro to Bulk Update Paragraph Styles
Implement a VBA script that iterates through all paragraph styles in your active document or template and replaces 'Normal' references with 'Body Text'.
This macro is designed to open your Normal template as a document and systematically check every paragraph style. If a style's BaseStyle or NextParagraphStyle is currently set to 'Normal', the script will automatically change it to 'Body Text'.
In your Word document, press the ALT + F11 keys on your keyboard to open the Microsoft Visual Basic for Applications window.
From the top menu, click 'Insert' and select 'Module' to create a new blank code window.
Type or paste the following code: Sub StylesToBodyText() Dim sty As Style NormalTemplate.OpenAsDocument For Each sty In ActiveDocument.Styles If sty.Type = wdStyleTypeParagraph Then If sty.BaseStyle = "Normal" Then sty.BaseStyle = "Body Text" If sty.NextParagraphStyle = "Normal" Then sty.NextParagraphStyle = "Body Text" End If Next sty End Sub
Press F5 or click the 'Run' button on the toolbar to execute the code. Review your styles carefully before saving the modified template.

Manage Styles and Macros Seamlessly in WPS Writer
WPS Writer offers full support for advanced document formatting, style hierarchy management, and VBA macros. You can easily automate your document styling processes with an intuitive interface and reliable macro execution.
- 1. Open Your Document: Launch WPS Writer and open the document or template you wish to format.
- 2. Access the Developer Tools: Navigate to the 'Developer' tab on the ribbon menu. If it's not visible, enable it from the software settings.
- 3. Run Your Macro: Click on 'Macros', create a new macro, paste your style-updating VBA code, and hit run to bulk change your styles instantly.

Frequently Asked Questions
How do I back up my Normal.dotm template before running macros?
You can find your Normal template by pressing Windows Key + R, typing '%appdata%\Microsoft\Templates', and pressing Enter. Locate the 'Normal.dotm' file, right-click it, select 'Copy', and paste it in another secure folder as a backup.
What is the difference between BaseStyle and NextParagraphStyle?
BaseStyle (Style based on) determines the parent style from which the current style inherits its fonts and formatting. NextParagraphStyle (Style for following paragraph) specifies the style that will automatically be applied when you press Enter at the end of a paragraph.
Why did my macro change styles I didn't want to affect?
The provided macro loops through all available paragraph styles in the template. If you only want to modify specific styles (e.g., Heading 1, Heading 2), you need to add an 'If' condition in your VBA code to check the specific style name (e.g., If sty.NameLocal = "Heading 1" Then...) before applying the changes.




