atw: Re: Delete unused styles

  • From: "Donald Halley" <donald@xxxxxxxxxxxx>
  • To: <austechwriter@xxxxxxxxxxxxx>
  • Date: Thu, 23 Dec 2004 15:10:52 +1030

Thank you

Regards
Donald Halley=20

-----Original Message-----
From: austechwriter-bounce@xxxxxxxxxxxxx
[mailto:austechwriter-bounce@xxxxxxxxxxxxx] On Behalf Of LIVERANI Petra
Sent: Thursday, 23 December 2004 3:00 PM
To: austechwriter@xxxxxxxxxxxxx
Subject: atw: Re: Delete unused styles

Hi Donald,
Editorium provides the macro below (
<http://lists.topica.com/lists/editorium/read/message.html?mid=3D17173814=
1
6>
http://lists.topica.com/lists/editorium/read/message.html?mid=3D171738141=
6
).



Sub DeleteUnusedStyles()

'Courtesy of the Editorium

'www.editorium.com

For Each sty In ActiveDocument.Styles

If sty.BuiltIn =3D False Then

If sty.InUse =3D False Then

    sty.Delete

Else

    Selection.HomeKey Unit:=3DwdStory

    Selection.Find.ClearFormatting

    Selection.Find.Style =3D ActiveDocument.Styles(sty)

    With Selection.Find

        .Text =3D ""

        .Replacement.Text =3D ""

        .Forward =3D True

        .Wrap =3D wdFindStop

        .Format =3D True

        .MatchCase =3D False

        .MatchWholeWord =3D False

        .MatchWildcards =3D False

        .MatchSoundsLike =3D False

        .MatchAllWordForms =3D False

    End With

    Selection.Find.Execute

    If Selection.Find.Found =3D False Then sty.Delete

End If

End If

Next sty

Selection.HomeKey Unit:=3DwdStory

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
**************************************************
**************************************************
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: