Sub CaptionBoldNot()
'
' CaptionBoldNot Macro
'
'
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Text = ""
.Style = "Caption"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Do While .Find.Found
With .Paragraphs.Last.Range.Duplicate
.End = .Start + Len(Split(.Text, " ")(0)) + 1
.MoveEndUntil " ", wdForward
.Style = "Strong"
End With
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
Thanks to the original author.
No comments:
Post a Comment