Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Location
    Annapolis, Maryland, USA
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find (not) styles (2002)

    Is there a way to select all text that is not formatted with a given style?
    Michael Coleman
    BOMI International

  2. #2
    Star Lounger
    Join Date
    Jun 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    As far as I know <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16> Word only allows a continuous(unbroken) range to be selected.
    If thats correct then there can't be anyway to select all instances of a style, becouse the first break (other style) would break the selection.

    A work around would be messy, you would have to step through all paragraphs bookmarking( or entering into an array, etc) any paragraph
    that was of interest. Maybe changing font /shading colour to highlight the paragraphs.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    What do you ultimately want to accomplish?

    You can use Find/Replace &:
    Find: the style that you don't want to select
    Replace All: with say, shadow (or anything not otherwise used in your document)

    Then Find: Font/Not shadow
    Replace with what you want.

    That will have the effect of changing everything that wasn't the original style. Then you go back & replace everything with shadow font to not shadow.

  4. #4
    Star Lounger
    Join Date
    Feb 2003
    Location
    Annapolis, Maryland, USA
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    I have a document of about 250 pages. (Many of you are familiar with it by now.) Almost all of it is formatted with the style name "definition." There are three other welcome styles, "subdefinition," "formula," and "headletter." I was hoping to find all other styles being used because there are strange things going on in the file. But now I think I figured it out.

    There used to be a gazillion comments throughout the document. Now there are none. But there are some spaces and sometimes hard return paragraph marks formatted with the character style comment reference. If I search for that style and pick Find All, it finds either 4 or 362, depending on whether or not the formatting marks are showing. Just by running a macro that deletes spaces before a paragraph mark, I eliminated about 50 of them. Most of the others I can just change to the "definition" style, except for a few paragraph marks formatted with the comment reference character style and a few others. Those still act strangely. They look almost normal when the formatting is showing, but without formatting, the next paragraph is run in. If I use Clear Formatting on it, that seems to do the trick.
    Michael Coleman
    BOMI International

  5. #5
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    Hi Michael,

    How about changing the styles you *don't* want selected to Hidden Text, doing what you need to do to the remaining text, then turning back to non-Hidden text?

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    Hi Michael:
    I'm glad you have it sorted out, but for future reference:
    1. If you perform a search & there is hidden text that is not showing, the search will not include the hidden text. That's why you get different results when searching for the comment reference style.
    2. If I understood correctly, you could have simply searched for the comment reference style (with hidden text showing) & replaced it with nothing.
    3. If you want to see what styles exist in your document, I believe that you can use the Task Pane for this purpose. I can't check as I don't have Word 2002.
    4. It would be better to describe what behavior occurs, rather than as "act strangely.
    Cheers,

  7. #7
    Star Lounger
    Join Date
    Jun 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find (not) styles (2002)

    I guess this response falls into the whatever category.

    The attachment is a Word doc that carries a module that 'colours' documents. The background of it was a conversion /translation utility that
    cycled thro' a docs paragraphs and changed the background color. This resulted in a starting document that was evenly coloured.

    As the translator ran it again cycled through the doc para by para, a successful conversion reset the paras color to auto, errors where then represented
    by other colors. The end result was a document where process used/failed/success where all clearly visible. This allowed users to carry out conversions
    over a number of sessions.

    And all without having to generate INI files to keep track of everything. Anyway, this module has a test sub that I hope is pretty self explanitory.
    It can either shade paras that contain a specified style or Not, It then has another function that carries out some action based on a paras colour.
    Attached Files Attached Files

Posting Permissions

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