Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Mar 2001
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Highlighting Text (Word 2003)

    I have an existing document where I need to high light and then italicize the text that appears between two underscores. For example, the text may look similar to this _Today Is_ Tuesday. "Today Is" needs to be italicized.

    Can anyone help me with this?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Highlighting Text (Word 2003)

    You could do it in two passes, first using a wildcard find-and-replace to italicize the _WholePhrase_ and then using a second search to de-italicize the underscores. A macro might be cleaner, but would take longer to write. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    Lounger
    Join Date
    Mar 2001
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Highlighting Text (Word 2003)

    Sound like we are on the right tract, but could you please give me a step by step. I'm not very proficient with Word.

    Thanks

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Highlighting Text (Word 2003)

    In the Find and Replace dialog, you will notice a button labeled "More." Once you click this, you will have access to the necessary features: Wildcard searching, and the format find/replace features.

    Start with a "test" find. Tick the Use wildcards checkbox In the Find what box, try _*_ -- that should match anything between two underscores. Find several times to see whether it is working the way you like. If it does, go to the Replace tab. In the Replace with box enter the code for "found text" which you can insert using the Special characters pop-up. Then press Ctrl+i to force the change from "anything" to italics. Try a few replaces to see whether it is working correct and, if you like the results, Replace All.

    To unitalicize the _ characters, turn off wildcards and assign the appropriate formatting to the Find what and Replace with boxes. I believe that Ctrl+i toggles to "italic", "not italic" and "no setting," but if that doesn't work, you can use the Format button to access the Font dialog and choose whatever you like.

    The above is a rapid sketch, so I might have forgotten something, but hopefully you can work it out from here. Does it help?

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

    Re: Highlighting Text (Word 2003)

    This replacement worked for me:

    Edit > Replace

    Use Wildcards
    Find What: (_*_)
    Replace With: 1
    Format Font Italic

    StuartR
    Attached Images Attached Images
    • File Type: gif x.GIF (26.3 KB, 0 views)

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

    Re: Highlighting Text (Word 2003)

    And if you want to get rid of the underscores, use _(*)_ in "Find what".

    _([!^13]@)_ would be a bit "safer"...
    I tend to avoid the * wildcard because it can match lots of text. [!^13]@ limits the match to one paragraph.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

Posting Permissions

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