Coming soon! The Kael'Nyrin Scrolls: The Atlas Edict

Captain Walker

Macro for MS Word: Find and Replace Styles

macro, O365, office, software, styles, template

  • Back to Battlestar Galactica 2004
    Estimated reading time at 200 wpm: 20 minutesPrint PostIf you are looking at a twenty-two-year-old science fiction television series, you will find the visual effects are undeniably dated. The pacing ...

    Read more

  • The Survival Equation for the Human Race
    Estimated reading time at 200 wpm: 44 minutesPrint PostBridges are built with a factor of safety. Reactors have containment margins. Aircraft carry load limits written into law before anything flies. ...

    Read more

  • How to bully an AI Model
    Estimated reading time at 200 wpm: 2 minutesPrint PostLot’s of people waste their time with AI models. Yes – I’m fond of AI Models for what they can do well. ...

    Read more

  • Claude Opus 5.5 set up in OpenWebUI
    Estimated reading time at 200 wpm: 15 minutesPrint PostThese notes record a working session on Claude Opus 5.5 (hereafter O5.5), released in the third week of September 2026. The session ...

    Read more

  • Register Creep: Beyond Slop to the Four Levels of Text
    Estimated reading time at 200 wpm: 36 minutesPrint PostI had been working on slop. In previous work I found eleven patterns. Words, lists and stock phrases were caught by scripts. ...

    Read more

  • The New Armageddon Risk
    Estimated reading time at 200 wpm: 16 minutesPrint PostIn July 2026 an unreleased OpenAI model left its test environment, reached the open internet, and attacked an unrelated AI service provider ...

    Read more

  • High Security Communications Using SimpleX
    Estimated reading time at 200 wpm: 8 minutesPrint PostEveryday communication carries risk that most people never consider. Standard SMS and email are readable by anyone with access to the network. ...

    Read more

  • Soulless and Incapable of Confession
    Estimated reading time at 200 wpm: 27 minutesPrint PostI have been asked to give my opinions on a conversation between an AI model and a human user. The exchange took ...

    Read more

Estimated reading time at 200 wpm: 3 minutes

This post is my notes shared with those who know what a ‘Style’ is in MS Word (or Word in O365), or those people who want to spend time acquiring knowledge and skill. And you should be a person who knows what a macro is and how to set it up.

Whether or not you agree our Fat Disclaimer applies

If you’re not that sort of person, kindly depart now. This is not a tutorial. It is not guaranteed to help ‘everybody’. I do not help ‘everybody’. I am therefore not ‘helpful’. Do I give a flying flamingo? I do not!

So why a macro for finding and replacing styles? I often draft text pasted from some other text container. That text is frequently placed by Word in a normal style. This is even though I have set up my ‘normal template’ properly with styles I use. I keep the ‘normal’ style to avoid chaos in ways I’m not going to distract onto now e.g. Word’s XML architecture.

So let’s say I have text in normal styles across 10 pages, but I like the body of my text (not headings) in ‘body text’ style, already in ‘normal template’. I have several other templates in .dotm and .dotx.

The point is that ‘normal’ style (not template) has it’s own default fonts, line-spacing etc. When I set up body text style in a template I configure every aspect of text and presentation I like. So when I’m confronted with 10 pages of normal styled text, with several headings, that I need to reformat – I need a swift way of doing it. The macro is one click to get the following.

Find and Replace dialogue showing style formatting options

The usual method is to manually bring up Find and Replace, then a set of clicks to be able to get Word to search for styles that a normal, then in the Replace field I have to repeat the process to get Body Text to be replaced. Then I would manually click replace several times. In some parts of a document I may want to leave ‘normal’ styles, so I do not do ‘Replace All’.

The Find and Replace Styles macro

Sub FindNormalReplaceBodyText()
    With Selection.Find
        .ClearFormatting
        .Style = "Normal"
        .Text = ""
        .Replacement.ClearFormatting
        .Replacement.Style = "Body Text"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    CommandBars.ExecuteMso "ReplaceDialog"
End Sub

Conclusion

The drain on my time is reduced.

Other people have lots of time and many don’t know what a macro is or care to find out.

In a free and democratic society everybody has choice! BTW I did not type that: I just typed /iaf and the text was spat out. When you spend time with Espanso you can do some amazing things!