![]() |
|
|
|
#1
|
||||
|
||||
|
You could do that with a macro like:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "<[A-Z]{2,3} [A-Z]{2,}>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
.Case = wdTitleWord
.Font.SmallCaps = True
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "<[A-Z\-]{4,}>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
.Case = wdTitleWord
.Font.SmallCaps = True
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
| Tags |
| allcaps, smallcaps, wildcards |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Include small caps in hierarchical multi-level list
|
Hardbottle | Word | 1 | 06-20-2015 05:12 AM |
| change non capitalized text to capitalized text | antoniob | Excel | 8 | 10-13-2014 09:11 AM |
| Is there a way to find CAPITALIZED words in a doc? | Bobosmite | Word | 8 | 01-28-2014 03:53 PM |
small caps auto check
|
gene | Word | 1 | 12-03-2011 03:04 PM |
| French accents in small caps | nuitsdete | Word | 0 | 09-23-2011 01:53 AM |