Thread: [Solved] Reverse Bold macro
View Single Post
 
Old 02-25-2016, 08:26 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,600
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Kluncky but fast:

Code:
Sub ReverseBoldII()
Application.ScreenUpdating = False
Dim oRng As Range
  Set oRng = Selection.Range
  With oRng.Find
    .Text = "(*)"
    .Font.Bold = False
    .MatchWildcards = True
    With .Replacement
      .Text = "^&"
      .Font.Bold = True
      .Font.DoubleStrikeThrough = True 'any unused font attribute
    End With
    .Execute Replace:=wdReplaceAll
   End With
   Set oRng = Selection.Range
   With oRng.Find
    .Text = "(*)"
    .Font.Bold = True
    .Font.DoubleStrikeThrough = False
    .MatchWildcards = True
    With .Replacement
      .Text = "^&"
      .Font.Bold = False
    End With
    .Execute Replace:=wdReplaceAll
   End With
   Set oRng = Selection.Range
   With oRng.Find
    .Text = "(*)"
    .Font.Bold = True
    .Font.DoubleStrikeThrough = True
    .MatchWildcards = True
    With .Replacement
      .Text = "^&"
      .Font.DoubleStrikeThrough = False
    End With
    .Execute Replace:=wdReplaceAll
   End With
Application.ScreenUpdating = True
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote