Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2003
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to remove unbolded text? (Word 2002)

    Is there a way to write a macro to remove all unbolded text within a document? I am sent a daily patient schedule, which only has the pertinent information bolded. Because there is so much additional information in the schedule, it makes it difficult to pick out the patient information, which really slows me down when typing the reports. I've tried highlighting the entire document to see if this is possible, but I haven't been able to figure anything out.

    Thank you for any help you can provide.

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

    Re: Macro to remove unbolded text? (Word 2002)

    Interactively:

    - Select Edit | Replace...
    - Leave both Find What and Replace With blank.
    - Click More.
    - Make sure the insertion point is in the Find What box.
    - Select Format > Font...
    - Select Not Bold in the Font Style list.
    - Click OK.
    - Click Replace All.

    In a macro:

    Sub RemoveNotBold()
    With ActiveDocument.Range.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .Font.Bold = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    .Execute Replace:=wdReplaceAll
    End With
    End Sub

  3. #3
    Star Lounger
    Join Date
    Jun 2003
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to remove unbolded text? (Word 2002)

    Thank you Hans. It worked like a charm! I had tried doing this previously, but made the mistake of selecting all text beforehand. :-)

Posting Permissions

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