Making Page Numbers as Words Instead of Numbers

Recently, I came upon a script that is so awesome that I have to share it with you. The question came up:

Is it possible set up automated page numbering where the numbers are actually formatted as words instead of numbers? e.g. ‘Four’ instead of ‘4’

Most of us would simply reply, “No.” But Theunis de Jong (a.k.a. Jongware) took on the challenge and decided to write a script that could do this.

The script works like this: You type a # symbol in a text frame on your master page (that’s a normal # symbol, not a special character):

Wordnum1

Then, go back to your document pages and double-click the script in the Scripts panel.

Wordnum2

The script quickly overrides those master page items and changes the # to an actual number, based on the “real” page number. (It only acts on the # symbol when it’s from the master page; it won’t mess up the # symbol when used normally on document pages.) For example, if your document starts on page “1” then it would end up looking like this:

Wordnum3

I have tried this with documents starting on any number (even over a thousand) and it converts to “word numbers” properly. Even better, if your document page numbers later change, you can run the script again and it updates the page numbers!

Download

Sorry, you need to be logged in as a free or paid member of InDesignSecrets to download this file.

Note that there is another script, written by Gerald Singlemann at this Github.

Bookmark
Please login to bookmark Close

This article was last modified on January 18, 2022

Comments (30)

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Damian McKee
    September 30, 2022

    Sorry got it sorted

  2. Damian McKee
    September 30, 2022

    Hi David don’t seem to be able to get this script to work. Would there be an updated version by now?

  3. Emilio Lari
    May 7, 2022

    Is anyone planning to recompile this for the new InDesign?

    1. David Blatner
      May 7, 2022

      Emilio: The good news is that scripts do not have to be recompiled with new versions. (Plug-ins do, but not scripts.) I have scripts that were from 10+ years ago that still work. I have not tried this one, but it should still work. Try it?

  4. Jared Shapiro
    June 15, 2019

    This is a great script! I put it to good use; however I’ve come across an error along the way. “5122: The master page item is already overridden on the page.” Now it won’t update new pages–only pages already laid out. I thought it might be that I accidentally put two #’s on a page, or had one overlapping another, but that doesn’t seem to be it. Error source: line 26 “frame = masterFrame.override (aPage);”

    Oh, I see Cathy Mores above is having the same issue. Mine worked to page 39.

    Help?

    1. Jared Shapiro
      June 15, 2019

      I think I got somewhere, but I don’t know why it worked: I deleted the text box with the # sign on the first page it stopped working, and then reapplied the master to the page. It fixed the rest in sequence.

  5. Cathy Mores
    April 17, 2019

    I’m getting an error 5122 when using this script. Says line 26 (frame = masterFrame.override (aPage)) is causing the issue? I’m getting it to work on the first 20 pages or so of the document, but doesn’t work all the way through, whether the master page has been overridden or not.

  6. Emilio Lari
    January 23, 2019

    Can someone help me translate it in Italian? I’ve done most of the work but there are some exception on how you spell out numbers that I don’t know how to integrate.
    for example all the 2 digit numbers that contain 1 and 8 are spelled slightly different from the other ones (they basically lose the last letter before the unit):
    20= Venti 22= ventidue but 21=ventuno 28=ventotto
    30= Trenta 32= trentadue 31=trentuno 38= trentotto
    and so on for all the numbers till 100 (120=centoventi 121=centoventuno)

  7. October 29, 2017

    Merci beaucoup pour vos efforts , mais le script en français ne marche pas .
    je travaille via indesign cc. le scipt englich marche bien mais pas le français.

  8. Audrey
    May 25, 2017

    Can change word (WriteOutNumbers.jsx) to lowercase letters instead upper and lowercase letters?

    1. Thiago Ribeiro Nogueira
      May 26, 2017

      Hi Audrey,

      I think you can open and edit the script. Go to line 33 and change “toUpperCase” to “toLowerCase”.

      Works for me!

  9. John Ringer
    April 17, 2016

    Absolutely brilliant, many thanks Jongware,

  10. May 26, 2015

    Hi Jongware, knowing you are Dutch, is it easy for you to make a Dutch version?

  11. Loïc Horellou
    May 19, 2015

    Hello, and thanks a lot for this script, I just updated the numberToText function to be able to work with the french way of counting (which is a bit more complicated than the english or spannish way :-/ ) :

    https://jsfiddle.net/lohic/9f9y9z9n/

    1. October 29, 2017

      Merci beaucoup pour vos effors , mais ce script ne marche pas avec moi. je travaille via indesign cc. le scipt englich marche bien mais pas le français.

      1. LoÌøc Horellou
        October 29, 2017

        In the jsfiddle link I just uploaded the numberToText function. This function needs to be replaced in the English script. I did use it several times without any bug.

      2. [Jongware]
        October 29, 2017

        So what does not work? “It doesn’t work” is not a useful debugging report, in any language …

  12. Thiago Ribeiro
    April 16, 2015
  13. Jonathan Paterson
    April 12, 2015

    One small correction : in line 79, change “fourty” ti “forty”.

    1. Masood Ahmad
      April 13, 2015

      Indeed another Masterpiece by Jongware. Good one.

  14. April 7, 2015

    Never mind. I downloaded it a second time, and it work perfectly. Nice addition to design tool.

  15. Jongware
    April 7, 2015

    Please try to not make it hard for the script to work :P

    guz: check how your rulers are set up: ‘per page’, ‘per spread’ , or ‘on spine’. I *think* the script might mis-place boxes as you describe when the rulers are not ‘per spread’.

    moizngp: unfortunately, not enough information… The error message describes what’s wrong but it cannot tell *why*. For instance, perhaps the objects on the master page are locked? Or, frankly, thousands other possibilities… Try with another document.

    1. Carlos Padilla
      April 27, 2018

      Is it possible to use the script with a book?

      I understand I have to open each file on the book and run the script, but maybe is possible to chage something to select all the files in the book instead of the active document.

  16. April 7, 2015

    I am using InDesign CC (version 9.3), and I cannot install the script. The download is a plain white icon with the .jsx. However, it doesn’t unzip, nor will it drag onto the Utilities>Script panel. ??

    1. Jongware
      April 7, 2015

      @Page: well, it’s a plain .jsx so it does not need unzipping, and that’s the good news. The bad news is you are not SUPPOSED to ‘drag it’ on the Script panel. Please see David’s link to How to install a script.

      1. Damian McKee
        September 30, 2022

        Hi Theunis, would the new naming change from Master page to Parent break the script?

  17. moizngp
    April 6, 2015

    Sounds very interesting.
    I tried the script on InDesign CC (latest version) on Windows 7 and received following error.

    Error Number: 30614
    Error string: Invalid object for this request.

    Engine: main
    Line: 26
    Source: frame = masterFrame.override(aPage);

  18. April 6, 2015

    That’s really cool! What languages does the script support?

    1. April 6, 2015

      Um… English only, as far as I can tell. If you open the script you may be able to edit it for other languages. However, some languages have very different ways of constructing number words, so it may be difficult to localize this one.

      1. guz
        April 6, 2015

        I tested it but the number is placed off the page. I placed the text box in the master page centered at the bottom but it comes out off the page towards the spine. Wonder why.