Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Sep 2003
    Location
    Bad Voeslau, Austria
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    When headings in a document are formatted manually I used to use the Search/Replace to search for the (manual) formatting and replace it with the appropriate style. Worked fine on Word 2000.
    Doing that with 2003 I get "interesting" results ...
    Example: Manual format Arial, 14pt, bold
    Style "Heading1" Arial, 16pt, bold
    Result after "replace all": Style is Heading1, Font is Arial, 16pt - but _not_ bold!
    I had to do a second "replace all" searching for Style + normal replacing with Style and bold.
    What did I do wrong? Or is this a new "feature"?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    Find & Replace applies the style but does not remove the manual formatting, and since Bold acts as a toggle, your text is now not-bold (and are you sure it is 16 points?)

    You can also repair this by doing a second replace, of Heading 1 with the "style" Default Paragraph Font. Or you can remove ALL manual formatting by selecting the entire document (Ctrl+A) and pressing Ctrl+spacebar.

  3. #3
    Star Lounger
    Join Date
    Sep 2001
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    Hi Austrian

    Word 2003 knows differnt style types: paragraph, character, table list. Depending on your selection (I did not try it with ranges yet.) some styles simply will not be accepted. Probabely you have to work out, what kind selection is required for your style type.

    Hope this helps
    hedgehog

  4. #4
    New Lounger
    Join Date
    Sep 2003
    Location
    Bad Voeslau, Austria
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    Thanks, of course I can repair this.
    However, it seems to me a bad change from the way previous versions of Word acted. It was my standard way to repair badly made documents - you know that numbering headings, creating TOC's etc are quite easy working with styles, and complicated working without ... even if a lot of people do not realize this.
    Does anybody know the rationale behind that change in behaviour (sorry to say, I am always very late in switching to new versions of MS programs)?

  5. #5
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    You can do one-pass fixes if you use VBA. Example:
    <pre> Dim rngX As Word.Range

    Set rngX = ActiveDocument.Range(0, 0)

    With rngX.Find
    With .Font
    .Name = "Arial"
    .Size = 14
    .Bold = True
    End With
    Do While .Execute = True
    With rngX
    .Font.Reset
    .Style = "Heading 1"
    .Collapse wdCollapseEnd
    End With
    Loop
    End With

    Set rngX = Nothing</pre>

    If you do this a lot and were feeling ambitious, you could add a UserForm to the start of the macro that took as input the manual font name and size (and whether bold was True or False) and the replacement style.

  6. #6
    New Lounger
    Join Date
    Sep 2003
    Location
    Bad Voeslau, Austria
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing manual formatting with styles (Word 2003 SP1 /WIN XP Pro)

    Thank you for this nice macro! Hopefully I will not encounter enough "badly" made documents to need it.
    Still, I feel it is a step back to have to use a macro to accomplish something a previous version could do with the built-in commands. Even more so since _manually_ replacing the manual formatting with a style (putting the cursor in the heading and selecting the proper style) works OK, no toggling of bold, only using the search/replace to achieve it for the whole document does not.

Posting Permissions

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