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

You have already had one suggesting which apparently you ignored. Paul's code seems fast to me. The only possible issue with it is that it pukes if your selection happens to include the final paragraph mark.

You can try:

Code:
Sub ReverseBoldII()
Dim oRng As Range
Application.ScreenUpdating = False
Set oRng = Selection.Characters.First
  Do
    oRng.Font.Bold = Not oRng.Font.Bold
    Set oRng = oRng.Characters.Last.Next
  Loop Until oRng.Start = Selection.Characters.Last.Start
  Application.ScreenUpdating = True
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote