Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2016, 02:23 PM
macropod's Avatar
macropod macropod is offline How to find CAPITALIZED names and change them into small caps Windows 7 64bit How to find CAPITALIZED names and change them into small caps Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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
However, there is no way of differentiating between acronyms (e.g. BBC) and names, so you'll need to check that your acronyms (and any other words to need to retain capitalized) are intact after running the macro.

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]
Reply With Quote
Reply

Tags
allcaps, smallcaps, wildcards



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find CAPITALIZED names and change them into small caps 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
How to find CAPITALIZED names and change them into small caps 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft