Microsoft Word: Make numbers in selected text superscript without affecting the words

I love Keyboard Maestro and use it for simple things. But I have something complex I need to do, but cannot figure out how best to accomplish it. I would be really grateful if somebody could help,

My daily workflow means that I paste bible scriptures into Microsoft Word continually. I have a service defined to pull the scriptures from my bible programme and insert them into Word.

The bible scriptures can only be exported with no formatting (this has been verified).

Here is the problem, each bible verse begins with a verse number. I need all those verse numbers to be superscript and it takes a long time to do this manually.

Can somebody help me figure out how to set up a macro in KM that enables me to convert any numbers in selected text in Word to superscript numbers, without affecting the rest of the text?

Thank you for any help you can give…


Post some examples of exactly what text is copied.

Here is an example. I want all the bible verses to be superscript!

Thank you for your help!

1 In the beginning God created the heavens and the earth. 2 The earth was without form, and void; and darkness was on the face of the deep. And the Spirit of God was hovering over the face of the waters. 3 Then God said, “Let there be light”; and there was light. 4 And God saw the light, that it was good; and God divided the light from the darkness. 5 God called the light Day, and the darkness He called Night. So the evening and the morning were the first day. 6 Then God said, “Let there be a firmament in the midst of the waters, and let it divide the waters from the waters.” 7 Thus God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament; and it was so. 8 And God called the firmament Heaven. So the evening and the morning were the second day.

This action will go through the text on the clipboard and find each sequence of one or more digits and apply a superscript type to it:

Note that by applying any style, you necessarily get styled text, which means the font will be defaulted to something, probably Helvetica 12 so that will no longer simply take up the font/size of the target text like plain text would.

For Each.kmactions (1.5 KB)


Great solution, Peter. I don’t think I would ever have thought of this approach.
Learned something new about the “For Each” Action.

1 Like

That’s perfect! Many thanks!

1 Like

Not sure how this works but it does. Solves my request. Thank you.