Reply
 
Thread Tools Display Modes
  #1   Report Post  
Klaus Löffelmann
 
Posts: n/a
Default Remove unused styles

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


  #2   Report Post  
Jezebel
 
Posts: n/a
Default

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.






"Klaus Löffelmann" wrote in message
...
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




  #3   Report Post  
Andy
 
Posts: n/a
Default

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



  #4   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

"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.

--
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.

"Jezebel" wrote in message
...
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.






"Klaus Löffelmann" wrote in message
...
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





  #5   Report Post  
Klaus Löffelmann
 
Posts: n/a
Default

Thanks to all of you for the help!

Klaus

"Klaus Löffelmann" schrieb im Newsbeitrag
...
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






  #6   Report Post  
Jezebel
 
Posts: n/a
Default

Quite right. It's the 'Available Styles' option that restricts the lists to
those actually in use.



"Suzanne S. Barnhill" wrote in message
...
"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.

--
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.

"Jezebel" wrote in message
...
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.






"Klaus Löffelmann" wrote in message
...
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







  #7   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

Yeah, one of those task pane subtleties that I have totally not mastered!

--
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.

"Jezebel" wrote in message
...
Quite right. It's the 'Available Styles' option that restricts the lists

to
those actually in use.



"Suzanne S. Barnhill" wrote in message
...
"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.

--
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.

"Jezebel" wrote in message
...
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.






"Klaus Löffelmann" wrote in message
...
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








  #8   Report Post  
Jezebel
 
Posts: n/a
Default

Yep, they're adding functionality at about the same rate as my memory is
deteriorating...



"Suzanne S. Barnhill" wrote in message
...
Yeah, one of those task pane subtleties that I have totally not mastered!

--
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.

"Jezebel" wrote in message
...
Quite right. It's the 'Available Styles' option that restricts the lists

to
those actually in use.



"Suzanne S. Barnhill" wrote in message
...
"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.

--
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.

"Jezebel" wrote in message
...
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.






"Klaus Löffelmann" wrote in message
...
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










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple styles in a single paragraph skibikegolf Microsoft Word Help 1 January 5th 05 10:57 AM
remove hiddens files should read remove hidden data. rhdtool.exe ketch Microsoft Word Help 2 December 23rd 04 08:12 PM
Word Templates Remove Timo Microsoft Word Help 3 December 21st 04 09:15 AM
Stop Styles? AlSchultz Microsoft Word Help 1 December 3rd 04 09:07 PM
Copied/imported styles get "corrupted" Paul_at_Work Microsoft Word Help 10 December 3rd 04 04:15 PM


All times are GMT +1. The time now is 04:33 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"