N
Nomey
Dear VBA-ists,
How can I have the following macro execute until the end of the active document is reached? Th epurpose is to convert all instances of words (and phrases) in all caps to underscore, and then to small caps.
Best regards,
Shirley Nomey
Sub ChangeCapsToSmallCaps()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "([A-Z]{2;})"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Range.Case = wdLowerCase
With Selection.Font
.SmallCaps = True
End With
End Sub
How can I have the following macro execute until the end of the active document is reached? Th epurpose is to convert all instances of words (and phrases) in all caps to underscore, and then to small caps.
Best regards,
Shirley Nomey
Sub ChangeCapsToSmallCaps()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "([A-Z]{2;})"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Range.Case = wdLowerCase
With Selection.Font
.SmallCaps = True
End With
End Sub