atw: Re: Delete unused styles
- From: "LIVERANI Petra" <Petra_LIVERANI@xxxxxxxxxxxxxx>
- To: <austechwriter@xxxxxxxxxxxxx>
- Date: Thu, 23 Dec 2004 15:29:42 +1100
Hi Donald,
Editorium provides the macro below (
<http://lists.topica.com/lists/editorium/read/message.html?mid=1717381416>
http://lists.topica.com/lists/editorium/read/message.html?mid=1717381416).
Sub DeleteUnusedStyles()
'Courtesy of the Editorium
'www.editorium.com
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
Regards,
Petra
-----Original Message-----
From: austechwriter-bounce@xxxxxxxxxxxxx
[ <mailto:austechwriter-bounce@xxxxxxxxxxxxx>
mailto:austechwriter-bounce@xxxxxxxxxxxxx]
Sent: Thursday, 23 December 2004 15:13 PM
To: austechwriter@xxxxxxxxxxxxx
Subject: atw: Delete unused styles
Hi everyone
Many moons ago, in the days of Word 2 or Word 6, there was a disk of
extras that included an excellent macro called 'DeleteUnusedStyles'.
Does anyone still have a copy of the macro?
Regards
Donald Halley
MAXEN Pty Ltd.
Phone: +61 (08) 8231 7900
Fax: +61 (08) 8231 3766
< <http://www.maxen.com.au/> http://www.maxen.com.au/ <blocked::
<http://www.maxen.com.au/> http://www.maxen.com.au/> >
Disclaimer
This message contains privileged and/or confidential information
intended only for the use of the addressee named above.
If you are not the intended recipient of this message you are hereby
notified that you must not disseminate, re-transmit, copy or take any
action in reliance on it. If you have received this message in error,
please notify MAXEN immediately, and delete this email from your system.
Any loss/damage incurred by using this material is not the sender's
responsibility. Any views expressed in this message are those of the
individual sender, except where the sender specifically states them to
be the views of the MAXEN Pty Ltd. We do not guarantee that this
material is free from viruses or any other defects
**************************************************
To post a message to austechwriter, send the message to
austechwriter@xxxxxxxxxxxxxx
To subscribe to austechwriter, send a message to
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.
To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with
"unsubscribe" in the Subject field.
To search the austechwriter archives, go to
www.freelists.org/archives/austechwriter
To contact the list administrator, send a message to
austechwriter-admins@xxxxxxxxxxxxx
**************************************************
IMPORTANT NOTICE: This e-mail and any attachment to it are intended only to be
read or used by the named addressee. It is confidential and may contain legally
privileged information. No confidentiality or privilege is waived or lost by
any mistaken transmission to you. The RTA is not responsible for any
unauthorised alterations to this e-mail or attachment to it. Views expressed in
this message are those of the individual sender, and are not necessarily the
views of the RTA. If you receive this e-mail in error, please immediately
delete it from your system and notify the sender. You must not disclose, copy
or use any part of this e-mail if you are not the intended recipient.
**************************************************
To post a message to austechwriter, send the message to
austechwriter@xxxxxxxxxxxxxx
To subscribe to austechwriter, send a message to
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.
To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with
"unsubscribe" in the Subject field.
To search the austechwriter archives, go to
www.freelists.org/archives/austechwriter
To contact the list administrator, send a message to
austechwriter-admins@xxxxxxxxxxxxx
**************************************************
Other related posts: