Changing Pronoun Gender

by Allen Wyatt
(last updated January 25, 2018)


Robert would like to have a macro that changes the gender of pronouns in documents and wonders if, perhaps, there is anything suggested to make such changes.

If you are looking for a macro to change the gender of all pronouns in a document, that is relatively straightforward—all you need is one that will do universal search and replace operations for male pronouns and change them to female pronouns, or vice-versa.

If, however, you are looking for a macro that will alternate pronouns—first usage is male, second is female, etc.—such as is often done in non-fiction writing, that is a different story. That is best left to a skilled editor to make the judgment calls on which changes to make and how far to extend those changes.

So, assuming you want to go the universal route, the best approach is to use a macro that utilizes wildcard searching using pairs of pronouns (one male pronoun with a corresponding female pronoun) to specify the changes to be made. The following example uses such an approach to change he, him, his, and himself to the female forms (she, her, hers, herself) or vice versa.

Sub MaleToFemale()
    GenderChange (True)
End Sub
Sub FemaleToMale()
    GenderChange (False)
End Sub
Sub GenderChange(isMale As Boolean)
    Dim aRange As Range
    Dim fTest As Boolean
    Dim j As Long
    Dim k As Long
    Dim male
    Dim female
    male = Array("he", "He", "HE", "him", "Him", "HIM", "his", _
                 "His", "HIS", "himself", "Himself", "HIMSELF")
    female = Array("she", "She", "SHE", "her", "Her", "HER", "hers", _
                   "Hers", "HERS", "herself", "Herself", "HERSELF")

    Set aRange = ActiveDocument.Range 
    With aRange.Find
        .Replacement.Highlight = False
        .Forward = True
        .Format = False
        .Wrap = wdFindStop
        .Format = False
        .Highlight = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .MatchPrefix = False
        .MatchWildcards = True

        j = UBound(male)
        For k = 0 To j
            If isMale Then
                .Text = "<" & male(k) & ">"
                .Replacement.Text = female(k)
                .Text = "<" & female(k) & ">"
                .Replacement.Text = male(k)
            End If
            fTest = aRange.Find.Execute(Replace:=wdReplaceAll)
        Next k
    End With
End Sub

Note that there are three macros in the listing. You should use the MaleToFemale macro to change from male pronouns to female pronouns and the FemaleToMale macro to change the other direction. The pronoun pairs themselves are in the GenderChange macro, in the male and female arrays. Note that each pronoun is included in the array three times using different combinations of upper- and lowercase characters. This is because the wildcard search is case sensitive, so the different searchs for each case instance is necessary.

Even with a macro approach like this (or especially with such an approach) it is wise to read through your document after using. The reason is because the English language is terribly imprecise and there is ambiguity in the usage of some words we generally consider pronouns. For instance, the words "his" and "hers" can be used as either possessive personal pronouns or as possessive adjectives. It is only possible to distinguish the proper usage when looking at them in context, which is something the macro obviously doesn't do. Bottom line—read after changing so you can make sure your document still makes sense.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12896) 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. ...


Comparing Strings

As your macro is processing information, there will doubtless be times that it will need to compare information in ...

Discover More

Displaying Negative Times

Excel allows you to perform math using times as operands. If you subtract a later time from an earlier time, you should ...

Discover More

Printing a Worksheet List

Want a list of all the worksheets in your workbook? Here's a short, handy macro that will place all the worksheet names ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Accessing Paragraphs in a Macro

Need to process a document, paragraph by paragraph, in a macro? It's easy to do once you understand that Word's object ...

Discover More

Creating a Directory

Need to create a directory from within a macro? You can do it using a single command line, as detailed in this tip.

Discover More

Printing Shortcut Key Assignments from a Macro

Need to know what shortcut keys are defined? You can use a single macro command line to print out the definitions.

Discover More

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

View most recent newsletter.


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 five more than 3?

2018-01-25 11:06:46

Sarah J Eubank

It might be because I'm fairly inexperienced with macros that I don't know the answer to this, but I haven't seen anyone mention if they have run into issues with the macro changing non-pronoun words that have the same sequence of letters - for example, changing "this" to "thers" or "shelf" to "helf" because of "his" and "hers" being contained within the words. Do the pronouns used in the array need a space before and after the word like I do currently with my Replace function? Or does it search for whole words only?

Also, to answer your question Robert Jann: it sounds like you did bring the macro over correctly, since it is working. What Jennifer said about stopping at each word was in response to someone else's prior comment suggesting that a line be added to the macro to make it stop at each word. It does not currently do this. I agree with the idea Chris had (and Jennifer brought up again) though, and think it would be fastest/easiest if the document automatically tracked the changes for the user to step through and approve/reject each afterward.

2017-03-03 10:16:14

Robert Jann

Thank you. I am not sure I brought this macro(s) correctly into my copy of Word. However, when I run it, it does not stop and ask at each pronoun. It makes a change all-at-once. This results in foolish shounding sentences like, "She bought hers tie at their father's store." Should it be stopping and asking at each pronoun? If not, can it be made to do so?

2017-03-03 08:43:17

Jennifer Thomas

I think rather than stopping at each word, using Track changes would be better (add ActiveDocument.TrackRevisions = True before the find function in the macro).

2017-03-02 19:20:58


My take on another use for this macro would be where, for example, a lawyer or law clerk, is drafting wills for a couple and needs to make sure that the documents for both spouses reflect the proper gender. "John Smith made Helen Smith his executor." (and the mirror of this.) Ideally one would have a template for the will (subject to many personal edits, of course)that would gather the information for both individuals (the couple) and their gender(s) and create two documents with all the correct pronouns. A pop-up data entryform would collect first and last name fields, gender of each, and the names of executors and their genders.

I realise this is a niche use of Word, but it might be a very useful macro for other purposes. (form letters, for example.)


2014-01-23 17:08:35

Robert Jann

Here's an example using this macro:
He bought his tie at their father's store. He was her hero.
She bought hers tie at their father’s store. She was her hero.
If this macro could allow the user to find/replace each change individually maybe that would help.

2014-01-22 14:01:35

Glenn Case

Re Paul's note, use of "they" or "their" in place of "he" or "his", while gender-inspecific, is unfortunately not numerically inspecific, and thus results in a mismatch of plural pronoun with a singular verb.

While this is not uncommon in the vernacular, it is nonetheless incorrect and can make the writer appear uneducated or sloppy. The audience should be taken into account if this option is chosen. I would certainly not use this for any formal or professional writing.

I find that sometimes it helps to restate a sentence into a plural form if I want to do something along these lines. To use Paul's example, "Consumers can can exercise their choice by avoiding..." would achieve the purpose without the mismatch. However, that is harder to implement via macro.

2014-01-21 09:11:09

Jennifer Thomas

Chris is on the right track - 'his' to 'hers' is especially tricky; consider that "His lunch is his own property" converts to (with this macro) "Hers lunch is hers own property". But in other cases, the conversion would be correct. So I think it is important to either run this in track change mode and accpet/reject and Chris mentions, or advise users to run a find/replace process for 'hers'.

2014-01-20 08:34:41

Paul Osborn

Yes, Peter. But the English I learned (London, and Suffolk in England) allows the use of 'they' and 'their' for a singular anonymous person.

2014-01-19 14:40:53

Peter Kirkpatrick

Paul, I sympathise with your main point of aiming for gender neutral text. But it's also worth aiming for grammatical consistency. When you write "Any consumer can exercise their choice by avoiding Walmart. They can go ..." you have a singular consumer with plural pronouns. Better to try this:

"Consumers can exercise their choice by avoiding Walmart. They can go ..."

Then the grammar Nazis like me are happy too!

Of course how you macro this is another question...

2014-01-19 05:10:40

Paul Osborn

Indeed, excellent! Might I suggest a variant, which I shall clumsily call 'FemaleOrMaleToNoGender'.

I would use this in, for example, those cases when I am editing a text in which the author tends to use the male form when the actual gender of the person referred to is not known. I find this bias to 'he' and 'his' deeply-imbedded sexism. I tend to replace them with 'they' and 'their'.
Original: Any consumer can exercise his choice by avoiding Walmart. He can go to ...
Corrected to: Any consumer can exercise their choice by avoiding Walmart. They can go ...

Voila, a suggestion.

- Paul

2014-01-18 11:33:21

Robert Jann

How do I put this macro into my Word 2007 program? I am not familiar with code/VBA.

2014-01-18 05:49:55

Chris Robinson

Excellent, useful tip. As you say it is important to check the changes carefully (not least because there may be forgotten references to people in the text who may object to their gender being changed) and I wonder if it's possible to include an option to step through the changes and approve or reject each individually.

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

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.