A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Page Layout
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Remove unused styles



 
 
Thread Tools Display Modes
  #1  
Old December 29th, 2004, 08:20 AM
Klaus Löffelmann
external usenet poster
 
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  
Old December 29th, 2004, 10:00 AM
Jezebel
external usenet poster
 
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  
Old December 29th, 2004, 02:04 PM
Andy
external usenet poster
 
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  
Old December 29th, 2004, 03:51 PM
Suzanne S. Barnhill
external usenet poster
 
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  
Old December 29th, 2004, 04:32 PM
Klaus Löffelmann
external usenet poster
 
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  
Old December 29th, 2004, 09:03 PM
Jezebel
external usenet poster
 
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  
Old December 29th, 2004, 10:40 PM
Suzanne S. Barnhill
external usenet poster
 
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  
Old December 29th, 2004, 11:29 PM
Jezebel
external usenet poster
 
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










 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom styles not appearing Cindy M -WordMVP- General Discussion 0 November 4th, 2004 11:22 AM
update styles per new template Ellen Finkelstein General Discussion 10 July 9th, 2004 05:29 PM
Customized styles unexpectedly lose the formatting settings Sherry General Discussion 2 June 28th, 2004 05:37 PM
office 2000 remove tools bud Setup, Installing & Configuration 1 May 27th, 2004 10:40 AM


All times are GMT +1. The time now is 05:14 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.