How to clear unused syles in MS Word 2016?

I am working on a MS word document which has thousands of unused styles. I think it is because the document was modified by many hands before hand over to me. Below are the unused style that flooding the style gallery. Is there anyway we can enable the "Remove All: Not Currently Used" option to clear unwanted style?

 

Question Info


Last updated May 5, 2020 Views 7,315 Applies to:
It seems that MS Word is lacking a function like that. But I found a page where someone wrote a small VBA Macro to achieve exactly what you are looking for.
https://word.tips.net/T001337_Removing_Unused_S...

I'd suggest you make a backup copy of the document before trying that macro.
www.onenote-blog.de (German)
www.onenote-blog.com (English, but fewer articles)

4 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi Sze Hung,

Open that document and press Alt + F11

that will open the VBA Editor

In the pane on the left, double click 'ThisDocument'

Copy and Paste the code below into that blank page

Then click somewhere in the middle of that code and at the top, click the Play (run) button

That Code will remove all unused styles from that document

Delete all that code and close the VBA Editor

That's It!

Sub DeleteUnusedStyles()
Dim aStyle As Style

For Each aStyle In ActiveDocument.Styles
If aStyle.BuiltIn = False Then
With ActiveDocument.Content.Find
.ClearFormatting
.Style = aStyle.NameLocal
.Execute FindText:="", Format:=True
If .Found = False Then aStyle.Delete
End With
End If
Next aStyle
End Sub
___________________________________________________________________

Power to the Developer!

MSI GV72 - 17.3", i7-8750H (Hex Core), 32GB DDR4, 4GB GeForce GTX 1050 Ti, 256GB NVMe M2, 2TB HDD

19 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Note, this will not delete many of the built-in styles like normal and the heading styles, even if not used.
Volunteering to pay forward and help the Microsoft user community.]
Screenshots from SnagIt

Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

Legal website: http://addbalance.com

4 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

The quickest way to get rid of un-used styles is to copy the whole document, minus the final paragrah mark (¶), into a new, blank document. This does not remove styles which have been applied to text, though.

To show/hide paragraph marks as well as other nonprinting marks, click the ¶ icon on the Home tab.

You may also be interested in Greg Maxey's style report add-in; see https://gregmaxey.com/word_tip_pages/style_report_addin.html.

Stefan Blom
Microsoft Word MVP
Volunteer Moderator
~~~~
Note that MVPs do not work for Microsoft
MVP program information: https://mvp.microsoft.com/
~~~~

1 person was helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Thanks so much for the suggestion. It works well :)

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.