Making Managerial Titles Lowercase

by Allen Wyatt
(last updated April 26, 2014)

3

Nathan frequently runs across a problem with individuals capitalizing job titles (e.g., "The Finance Manager shall provide...") in documents. He would like a macro to check for every use of a managerial title and lowercase it, unless there is a valid reason to initial-cap the first word when the title begins a sentence. He wonders if it is possible, without inputting all thirty managerial titles, to set up a wild card to match any two-word phrase where the second word is "manager" or "managers."

It is possible to do a wild card search to find the types of instances you are seeking. All you need to do is do an advanced search, make sure the Use Wildcards check box is selected, and then use this pattern in the Find What field:

<[A-Za-z][a-z]{1,}>^32[Mm]anager*>

The pattern will find two words where the second word is manager or managers. It will find the words if both or either word is capitalized or both words are in lowercase.

The problem is that it is not possible to change a word that has been found using wildcards to all lower case. This means that you'll need to manually inspect what is found and then make any necessary changes by hand. If you only have to do this once in a while, that isn't too onerous because the Find and Replace dialog box is not modal. (That means you can leave the dialog box open on your screen as you make an edit in the document, then click Find Next in the dialog box to find the next matching occurrence.)

If you need to do such changes quite often, then the only alternative is to create a macro that will do the changes for you. The following macro searches for the same pattern noted above and then correctly changes the capitalization of job titles. The macro finds job titles comprised of two words with the second word being "manager," "Manager," "managers" or "Managers." It then removes any capitalization from the words unless the title starts a sentence in which case it only removes capitalization from the second word.

Sub FixManagerCapitalisation()
    Dim aRange As Range
    Dim bRange As Range

    With Selection.Find
        .ClearFormatting
        .Text = "<[A-Za-z][a-z]{1,}>^32[Mm]anager*>"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindAsk
        .MatchCase = False
        .MatchWildcards = True
        Do While .Execute
            Set aRange = Selection.Range
            Set bRange = Selection.Range
            bRange.MoveEnd unit:=wdSentence
            If bRange.Text <> Selection.Sentences(1).Text Then
                aRange = LCase(aRange.Words(1).Text) & Trim(aRange.Words(2))
            End If
            aRange = aRange.Words(1) & Trim(LCase(aRange.Words(2).Text))
            aRange.Start = aRange.End
            aRange.Select
            .ClearFormatting
        Loop
    End With
End Sub

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

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

Changing Line Color in a Drawing Object

Don't like the color of the lines that Excel chose for your drawing object? It's easy to choose your own colors, as pointed ...

Discover More

Problems Pasting Large Pictures

If you insert a large picture in your document and your text jumps all around and the picture seems to disappear, don't ...

Discover More

Copying a Spreadsheet

There are times when you don't want to mess up a spreadsheet, but you want to try out some changes. This is when making a ...

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)

Extra Space after Quotation Mark when Pasting

Have you ever noticed how Word can decide to add extra spaces when you paste information into your document? This is part of ...

Discover More

Adding Tabs at the Beginning of a Line

Press a tab at the beginning of a paragraph, and Word normally assumes you want to indent the paragraph. If you don't like ...

Discover More

Replacing Spaces in Part Numbers with Dashes

Word has a power capability to search for information and then replace that information in some way. Finding the right method ...

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}] 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 6 + 0?

2014-05-15 11:44:18

Richard

Perhaps you could use AutoCorrect. It would involve typing all the titles (twice) though, and would apply to those creating the documents in the first place.


2014-04-29 08:55:24

Ken Endacott

It is difficult to cover all possibilities. The following macro will work if the title is all capitals such as HR Manager and it will correctly work for "...the level B Manager...". However, it will not make lowercase the "A" in "...this is A Manager...".

Sub FixManagerCapitalisation()
Dim aRange As Range
Dim bRange As Range
Dim firstWord As String

With Selection.Find
.ClearFormatting
.Text = "<[A-Za-z]{1,}>^32[Mm]anager*>"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.MatchCase = False
.MatchWildcards = True
Do While .Execute
Set aRange = Selection.Range
Set bRange = Selection.Range
bRange.MoveEnd unit:=wdSentence
firstWord = aRange.Words(1).Text
If bRange.Text <> Selection.Sentences(1).Text Then
If firstWord <> UCase(firstWord) Then _
aRange = LCase(firstWord) & Trim(aRange.Words(2))
End If
aRange = aRange.Words(1).Text & Trim(LCase(aRange.Words(2).Text))
aRange.Start = aRange.End
aRange.Select
.ClearFormatting
Loop
End With
End Sub


2014-04-28 13:10:39

Peter Buxton

This won't work if the first word of the title is an abbreviation, e.g. HR Manager or EHS Manager and you want caps for the first part and lowercase for the second.


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.

Newest Tips
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.