AUTOMATIC STYLE DELECTION

  • Thread starter Thread starter Subligaria
  • Start date Start date
S

Subligaria

Hi,

Does anyone know of a way to automate the deletion of unused styles in Word
2007? Professional DTP programs have this feature but not, apparently, Word .
.. .

If Word doesn't come with a way to do this, does anyone know of a macro that
will do it?
 
You cannot _delete_ built-in styles. You can control their visibility,
however, using the Manage Styles dialog and Options, both of which are
located at the bottom of the Styles pane. Press Ctrl+Alt+Shift+S, then click
the 3rd (from the left) tool at the bottom of the Styles pane for Manage
Styles, or click the Options text to see additional choices.
 
My concern is that:

styles proliferate
a surplus of styles can adversely affect performance/file reliability

DTP programs address these issues by supplying an option to remove unused
styles in one go. I don't want to hide the critters; I want go get rid of
them without having to trawl through each style, searching to see if it's
used in the document and then manually deleting it if it isn't.

Surely someone has created a macro to do this?
 
I repeat: you cannot _delete_ built-in styles. No macro can overrule this.
The best you can do is hide them.

There is a fixed number of built-in styles. They do not proliferate. Any
styles that are proliferating would be user-created, and those can be
deleted... and it would be fairly trivial to write a macro to go through the
list and delete user-created styles that are not in use.

To delete built-in styles, however, you'd need to add magic to your macro,
and I don't believe the VBA Magical API has been released yet. ;-)

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
 
My original query didn't say anything about deleting built-in styles. You
assumed this.

Actually, I want to get rid of user-created styles.
 
Right-click on the style name in the Styles panel and choose Delete.

Herb probably expected you'd already thought of doing this but found
it didn't work on built-ins.
 
I presumed from the phrasing "unused styles" that you must have been talking
about built-in styles, since--if they're unused--how did they get there?

In any case, you can delete them in a variety of ways, but I find the
Organizer to be a handy way to do it, since it also provides access to the
underlying template--and deleting them there is the best way to make sure
they don't show up again in new documents based on that template.

In the Developer tab, click Document Template, then click the Organizer
button. In the Styles tab, click on the style you want to delete (in the
current document or the template it's based on), then click the Delete
button.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
 
Back
Top