Changing Pronoun Gender

by Allen Wyatt
(last updated March 7, 2020)


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")

    ActiveDocument.TrackRevisions = True
    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
    ActiveDocument.TrackRevisions = False
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 searches for each case instance is necessary.

Note that the macro also turns on Track Changes before it makes any changes. That way every change made by the macro is noted in the document and you can then use the regular Track Changes resolution process to evaluate each change made. This is done because the English language is terribly imprecise and there is ambiguity in the usage of some words that 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.


If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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, 2013, 2016, 2019, and Word in Office 365.

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


Hiding Columns Not within a Date Range

Want to automatically hide some columns that don't meet a date criteria that you set? You can't do it automatically, but ...

Discover More

Handling Leading Zeros in CSV Files

When dealing with files containing comma-separated values, you want to make sure that what gets imported into Excel ...

Discover More

Continuing Macro Lines

Program a macro, and you can easily find that some lines get very long. If you want to shorten the lines so they are more ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Finding Long Lines

Word is very dynamic in how it "flows" text from one line to another and one page to another. In most cases we are ...

Discover More

Accessing a Footnote Number in VBA

If you are working with a document that includes footnotes, you might use a macro to do some processing of that document. ...

Discover More

Converting Inches to Points

Typographical measurements are often expressed in points. There are several formatting settings that, when accessed ...

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 2 + 9?

2018-09-12 09:27:22


I wonder if this macro would work with C++ Qt programming language. The reason why I ask is because I'm making an app that allows customers to design their own custom ceremony scripts, whether it's for a wedding, baptism, or funeral. I want to have my app automatically print the text based on the selection of a gender radio button. However, there's a twist. In the wedding ceremony builder component of the app, there's a checkbox that says "Custom Title". If that one is checked, the couple can fill in an edit box with whichever title they want to call each other, such as "Lover", "Partner", or "Life Partner". And, if neither radio button is checked, the default text would be words like "parent", "parents", "child", "children", "spouse", "person", "they", "them", "themselves", "their", and "theirs". What are the parameters for me to incorporate this command into my C++ Qt source code?

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.