Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Long Island, NY
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing Styles in Bulk (Word 2002)

    Is there any way to "Remove all styles not in use in the current document" or whatever.

    I recently "inherited" an almost 100 page document. This had originally be written by about a dozen people and pieced together to form a "Handbook". Most of the original authors had no idea of how to format, etc. and used tons of makeshift things to get their part of the document to appear correct. Now, with the revision I am doing, I removed all of their makeshift formatting and reformatted it with headings, proper paragraph spacing, bullets and numbering, etc. This has made it a much nicer document and, of course, when editing, things don't seem to suddenly go haywire.

    My problem is that in the style box, there must be at least 150 different entries. At least. I know I can delete each style individually but to do all of these would be a real pain. I am wondering if there is some way I can do this in one fell swoop. I tried Control+A, Control +C and then pasting into a new document and then saving it with a different name, The new document had all the unused styles transferred with it.

    I am also curious. Do all these styles make it a larger document. It is now about 4 MG and it seems way too big. Yes, I have pictures in it. But I pasted them in as JPGs and then, to try to make them even smaller, I used the compress picture feature. All the pictures are also in grayscale.

    Thanks for any and all help anyone can give me

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Removing Styles in Bulk (Word 2002)

    See if the Macro in <post#=152037>post 152037</post#> works for you.

    StuartR

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Removing Styles in Bulk (Word 2002)

    Hi, Kathie. And if you'd rather not be bothered with a macro, you can remove multiples in the Organizer. There are numerous ways to get there, but probably the fastest is Tools / Templates and Add-Ins / Organizer. It should come up with the Style tab active. Just select the user-defined styles you want to remove and click Delete.
    Karen

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Removing Styles in Bulk (Word 2002)

    Here's another macro... You could remove the message boxes, but I prefer to check which styles are deleted/kept.<pre>Sub DeleteUnusedStyles()
    Dim myStyle As Style
    For Each myStyle In ActiveDocument.Styles
    If myStyle.InUse Then
    Select Case myStyle
    Case ActiveDocument.Styles(wdStyleDefaultParagraphFont)
    Case ActiveDocument.Styles(wdStyleNormal)
    Case ActiveDocument.Styles(wdStyleNormalTable)
    Case ActiveDocument.Styles(wdStyleHeading1) To _
    ActiveDocument.Styles(wdStyleHeading9)
    Case Else
    Selection.Collapse (wdCollapseStart)
    With Selection.Find
    .ClearFormatting
    .Style = myStyle
    .Forward = True
    .Wrap = wdFindContinue
    .Execute FindText:="", Format:=True
    If .Found = False Then
    StatusBar = myStyle.NameLocal
    If MsgBox("Delete?", vbYesNo, myStyle.NameLocal) = vbYes Then
    myStyle.Delete
    End If
    Else
    If MsgBox("Keep?", vbYesNo, myStyle.NameLocal) = vbNo Then
    myStyle.Delete
    End If
    End If
    End With
    End Select
    End If
    Next myStyle
    End Sub
    </pre>

    If you copy everything except the last paragraph mark into a new document, that should leave a lot of unused styles behind, too.
    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  5. #5
    2 Star Lounger
    Join Date
    Oct 2002
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Removing Styles in Bulk (Word 2002)

    Karen -- tried your suggestion (quicker for me, no macros), but I get the following error:

    The built in style "xxx" cannot be deleted.

    In my situation, I had a paragraph of style "Normal" and underlined and italicized it. When I moved away from the paragraph, it automatically changed the style type to "Heading 7." Of course this is NOT what I wanted done (or I would have changed the style myself!). As a result, that Style was pulled from the 'master list' (I suppose?) of styles into my document. And I therefore cannot remove it... [img]/forums/images/smilies/sad.gif[/img]

    Am I overlooking the obvoius?

    And is there any way to have Word *NOT* automatically change your styles?

    thanks!
    ..dane

    ps.- I am using Word 2000 (not 2002) but felt it was similar enough a topic to piggy-back on this thread...

  6. #6
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Removing Styles in Bulk (Word 2002)

    Hi, Dane. You are correct that 2000 and 2002 are similar enough to piggy-back.

    Once Word's built-in styles have been incorporated into a document then you have no option for removing them other than using a macro as described above. There are other work-arounds available but in that instance the macro is best.

    "is there any way to have Word *NOT* automatically change your styles?"
    <img src=/S/yep.gif border=0 alt=yep width=15 height=15> Bless MS's heart -- they want to help you... regardless of whether you want them to or not. In the instance of Word applying Heading7 to your text you have autoformat turned on. There are all sorts of options you may want to turn off. Take a visit to Tools / AutoCorrect and look at the autoformat and autoformat as you type tabs.

    One other thing -- it's a good idea to visit the styles you use frequently and make sure that "automatically update" is turned off... don't forget to "save to your template" while you're there to prevent future documents from having that nasty habit.

    Good luck!
    Karen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •