Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / December 2004

Tip: Looking for answers? Try searching our database.

Remove unused styles

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Klaus L?ffelmann - 29 Dec 2004 08:20 GMT
Hi,

I got a document from one of our writers, which unfortunately consists of
too many unused styles out of which only a few are really used.

Simple question: Is there a way, to remove all unused styles from such a
document, since the exsistence of all of them is simply too annoying now I
have to type-set the whole thing. And: I don't like to write a macro for
that (although, if somebody knew a source for such a macro, that would be
cool, too ;-)

Thanks,

Klaus
Jezebel - 29 Dec 2004 10:00 GMT
When you display style lists, you can choose to display only those actually
used in the document. The setting is provided differently according to which
version of Word you have, but it's there at least since Word 2000 (might be
there for prior versions also, but my memory isn't good enough).

You can delete styles in bulk using the Organizer, but you need to know
which ones to delete. You can print a list of the styles by printing the
document, selecting Styles from the Print What drop down on the Print
dialog. So if you're really keen, print the full list of styles, then select
'Styles in use' from the formatting dialog, mark off what's now shown in the
Styles list, and delete the rest.

You can also search for, and replace, styles using Find and Replace.

> Hi,
>
[quoted text clipped - 10 lines]
>
> Klaus
Suzanne S. Barnhill - 29 Dec 2004 15:51 GMT
"Styles in use" will display the same list that is shown in the Style
dropdown--that is, all the styles that have ever been used in the document.
Displaying the Style Area and scanning it for styles suspected of not being
in use is tedious but may be the most efficient procedure. Styles (aside
from Normal, Default Paragraph Font, and the built-in heading styles) can
also be deleted from the "Styles in use" list in the Styles dialog.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> When you display style lists, you can choose to display only those actually
> used in the document. The setting is provided differently according to which
[quoted text clipped - 24 lines]
> >
> > Klaus
Jezebel - 29 Dec 2004 21:03 GMT
Quite right. It's the 'Available Styles' option that restricts the lists to
those actually in use.

> "Styles in use" will display the same list that is shown in the Style
> dropdown--that is, all the styles that have ever been used in the document.
[quoted text clipped - 39 lines]
> > >
> > > Klaus
Suzanne S. Barnhill - 29 Dec 2004 22:40 GMT
Yeah, one of those task pane subtleties that I have totally not mastered!

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Quite right. It's the 'Available Styles' option that restricts the lists to
> those actually in use.
[quoted text clipped - 50 lines]
> > > >
> > > > Klaus
Jezebel - 29 Dec 2004 23:29 GMT
Yep, they're adding functionality at about the same rate as my memory is
deteriorating...

> Yeah, one of those task pane subtleties that I have totally not mastered!
>
[quoted text clipped - 62 lines]
> > > > >
> > > > > Klaus
Andy - 29 Dec 2004 14:03 GMT
I got this from an issue of Editorium Update.

Use at your own risk.

===================================================

Sub DeleteUnusedStyles()
'Courtesy of the Editorium
'www.editorium.com
Dim sty As Style
For Each sty In ActiveDocument.Styles
If sty.BuiltIn = False Then
If sty.InUse = False Then
   sty.Delete
Else
   Selection.HomeKey Unit:=wdStory
   Selection.Find.ClearFormatting
   Selection.Find.Style = ActiveDocument.Styles(sty)
   With Selection.Find
       .Text = ""
       .Replacement.Text = ""
       .Forward = True
       .Wrap = wdFindStop
       .Format = True
       .MatchCase = False
       .MatchWholeWord = False
       .MatchWildcards = False
       .MatchSoundsLike = False
       .MatchAllWordForms = False
   End With
   Selection.Find.Execute
   If Selection.Find.Found = False Then sty.Delete
End If
End If
Next sty
Selection.HomeKey Unit:=wdStory
End Sub
Klaus L?ffelmann - 29 Dec 2004 16:32 GMT
Thanks to all of you for the help!

Klaus

> Hi,
>
[quoted text clipped - 10 lines]
>
> Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.