Formatting Issues

How to Bulk Delete Unused Custom Styles in Microsoft Word

Ayan MasoodAyan Masood Oct 21, 2026 870 views

Question details

The user needs to remove multiple unwanted custom styles from a Word document at once, specifically targeting duplicate custom styles that have numbered names.

How to Bulk Delete Unused Custom Styles in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
Cleaning up the styles pane in a heavily formatted or merged document by automatically removing generated or duplicate numbered custom styles.
Observed behavior
The document contains numerous unwanted custom styles ending in numbers, cluttering the styles pane and making formatting management difficult.
Before you start

Before running any macros, strictly ensure you create a backup copy of your document, as text previously formatted with the deleted styles will revert to the default Normal style and cannot be restored using the undo command.

Solution 1Recommended

Use a VBA Macro to Delete Numbered Custom Styles

Running a short VBA macro is the most efficient way to identify and remove bulk custom styles ending with numbers.

Microsoft Word does not have a built-in button to bulk delete specific custom styles. However, you can use Word's built-in Visual Basic for Applications (VBA) editor to loop through the document's style list and automatically delete any non-built-in style that ends with a number.

1
Open the VBA Editor

Press Alt + F11 on your keyboard while your Word document is open to launch the Microsoft Visual Basic for Applications window.

2
Insert a New Module

In the top menu, click 'Insert' and select 'Module' to open a new blank coding window.

3
Paste the Macro Code

Copy the provided VBA macro code and paste it exactly into the blank Module window.

4
Run the Macro

Press F5 on your keyboard or click the green 'Run' button in the toolbar to execute the script and clear the numbered custom styles.

Use a VBA Macro to Delete Numbered Custom Styles
VBA Macro Script: Sub DeleteCustomStyles() Dim styl As Style For Each styl In ActiveDocument.Styles If Not styl.BuiltIn And IsNumeric(Right(styl.NameLocal, 1)) Then styl.Delete Next styl End Sub
Free Microsoft Office alternative

Experience Streamlined Document Formatting with WPS Office

If dealing with VBA macros in Microsoft Word seems too complicated, consider switching to WPS Office. It offers a lightweight, highly compatible alternative for everyday document editing with a clean and intuitive interface for managing your styles.

  1. 1. Download WPS Office: Visit the official WPS website and download the free software for your operating system.
  2. 2. Install and Open: Follow the quick installation prompts and launch WPS Writer.
  3. 3. Open Your Document: Drag and drop your Word document into the app to start editing with full format compatibility.
Free to use with a familiar, easy-to-learn interfaceSeamless compatibility with Microsoft Word (.docx) formats and stylesLightweight installation that runs smoothly on most devices
microsoft office alternative - wps office

Frequently Asked Questions

Why do custom styles with numbered names appear in my document?

Numbered styles often appear automatically when copying and pasting text from other documents or web pages, creating duplicate style variants of existing styles in your current document.

Will deleting a custom style delete the text formatted with it?

No, deleting a style does not remove the text itself. The text simply loses its specific formatting attributes and immediately reverts to the default Normal style of the document.

Can I run this macro on Microsoft Word for Mac?

Yes, Microsoft Word for Mac supports VBA macros. You can access the VBA editor by navigating to Tools > Macro > Visual Basic Editor and pasting the exact same code to clean up your styles.

How do I delete just one specific custom style in Word?

To delete a single style, open the Styles pane (Alt + Ctrl + Shift + S), right-click the custom style you want to remove, and select 'Remove from Style Gallery' or 'Delete'.