Converting to Lowercase and Small Caps

Written by Allen Wyatt (last updated March 25, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


2

Marcela has a document in which there are many instances of phrases such as "century XXI" where the only thing that changes is the Roman numerals. She would like all instances of Roman numerals following the word "century" to be converted to lowercase small caps. (This is necessary so that the small caps look correct.) Marcela wonders if there is a way to do this using Find and Replace.

When you format text as small caps, anything that is a capital letter looks the same as the unformatted version of the text. Anything that is lowercase, however, looks like a "small" version of a capital letter. Thus, the name small caps. (See Figure 1.)

Figure 1. Text showing effect of small caps on uppercase and lowercase letters (XXI).

This difference in how uppercase and lowercase is displayed by small caps is why Marcela indicated that she needed to both convert the Roman numerals to lowercase and format them as small caps.

Unfortunately, there is no ability within Find and Replace to change the case of letters. You can easily use a wildcard search to apply the Small Caps attribute to the Roman numerals, but not to change them to lowercase. In order to do that, you will need to use a macro:

Sub ConvertRomans()
    Dim aRange As Range

    Set aRange = ActiveDocument.Range
    With aRange.Find
        .ClearFormatting
        .MatchWildcards = True
        .Text = "century [MDCLXVI]{1,}>"
        Do While .Execute
            With aRange
                .MoveStart Unit:=wdWord, Count:=1
                .Text = LCase(aRange.Text)
                .Font.SmallCaps = True
                .Collapse direction:=wdCollapseEnd
            End With
        Loop
    End With
End Sub

This macro uses a wildcard search to find any instances of "century" followed by Roman numerals. If an instance is located, then the word "century" is excluded from the range that was found, meaning that only the Roman numerals remain. These are then converted to lowercase and the Small Caps attribute applied. The search continues, until such point as nothing more is found. (The macro runs very quickly, even in large documents.)

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (7853) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

TOC Heading Numbers Always Show in Bold

Linda's got a document that includes a table of contents that is based on headings in the document. When the headings ...

Discover More

Moving Text Using the Mouse

Many people use the keyboard to do their primary editing tasks. Word doesn't limit you to the keyboard, however. You can ...

Discover More

Always Open at 100% Zoom

Tired of shared workbooks opening at some strange zoom factor that makes viewing your data difficult? Here's how to make ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Changing What Is Pasted in a Dialog Box

When you record a macro, Word very literally records what you do. This includes filling in various settings in dialog ...

Discover More

Printing the Code for a Macro Procedure

Want to print your macros to hard copy? There are a few approaches you can use to accomplish the task, as discussed in ...

Discover More

Declaring Variables

Declaring variables in a macro is good programming practice. Here’s how to do it and how to make sure they are all ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2023-03-25 23:45:41

Tomek

Correction to my post of 2023-03-25 23:42:01: In the search term there is no space in the front; I replaced it with < for more robustness.


2023-03-25 23:42:01

Tomek

In case the macro based solution is not acceptable, (e.g., when the IT department blocks macros), may be the following approach would work :
1. Press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box.
2. Select the Find Tab.
3. In Find What: box type in "<[MDCLXVI]{1,}>" (without quotation marks, note the space in the front).
4. Check the "Use Wildcards" box.
5. Click on the button "Find In ▼" and select "Main Document". (see Figure 1 below) . This will select all occurrences of roman numerals (in capital letters, and separated from the text by spaces or other word delimiters; this is because of < and > in the find term.
6. Close the Find Dialog box.
7. Use the keyboard shortcut Shift-F3 to convert all the selected pieces of text to lowercase.
8. While the roman numerals are still selected, press Ctrl-D (or select Font down-arrow from the Home Tab on the ribbon). In the Font dialog box, select the Small caps check-box and clickOK.

That should do it. It looks harder in description than it really is.

NOTE: This approach depends on the roman numerals being capitalized and looking like a word. Beware, the process will convert some all-capitalized words, like MIX, CIVIL, MILD, etc., and in particular I into small caps. The last one (I) should be caught by the spelling checker though. For the rest of potential words, you may want to review for them while the affected text is still highlighted. Alternatively you may search for
"century [MDCLXVI]{1,}>", change it all into lowercase (Shift-F3 twice), and Small caps, then search for all occurrences of the word "century" and revert to normal font.

Figure 1. 


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.