日本語 한국어 中文简体 中文繁體 English
 Renumber - Word macro for renumbering examples


Synopsis

Renumber is a macro for Microsoft Word which renumbers examples and their references in linguistic papers.

Renumber processes documents input in an ordinary manner. There is no need to specially mark up example numbers. This document sample_e.doc, for instance, may be converted into this result result_e.doc. It does not take a second to process a journal article of average length.

The process of renumbering can be repeated as many times as needed.

The latest version is Renumber . ()
  • This macro is provided without any warranty. Make a backup copy of the original document when processing an actual paper.
  • This macro has been developed and tested with Windows XP + Word 2003, and also tested with Windows Vista/7/8 and Word 2007/2010/2013 as well as Word on Mac OS X. It will probably also work with newer versions of OS and Word.
  • This English version supposedly works on almost all localized versions of Windows.
  • The versions up to 1.32, without a slight modification, did not work properly with the French, German, Italian, Russian and Spanis versions of Windows, among other localized versions, under their default regional settings. I am indebted to Roberto Zamparelli for bringing this problem to my attention as well as finding a key to fix it.
  • All the materials on this site are copyrighted. Unauthorized redistribution is prohibited.

How to Give it a Try

First, try renumbering with sample_e.doc above. Save sample_e.doc onto the hard disk etc. and open it with Word, and follow the following procedure. (Some key assignments are different in Mac.)

1  Register the macro
When you use Renumber for the first time, you need to register it with Word as follows.
1) Press [Alt]+[F11] and start the Visual Basic Editor.
2) Right click on [Normal] in the upper left pane of the editor, and select [Insert] > [Module].
    A pane for editing macros will open in the right side.
     (If [Normal] is hidden, press [Ctrl]+[R] and it will appear.)
3) Copy the content of Renumber and paste it into the pane.
4) Save the change by pressing [Ctrl]+[S]
5) Close the Visual Basic Editor by clicking the [X] button in the upper right corner of the editor.

2  Run the macro - Renumbering examples
Press [Alt]+[F8] at the Word window of sample_e.doc, and a list of registered macros will appear.
Select Renumber and run it.


Usage Instructions

Each example number must be an integer, within the range 1 to 999, directly preceded by "(". Example numbers must be input manually, instead of by way of the automatic numbering function.

  • Automatic numbering, which may be annoying, can be turned off. Do a Google or any other search with keywords like "disable automatic numbering in word".
The following two points need to be borne in mind when you write a paper.
  • Avoid starting a paragraph with an example number
    If a paragraph starts with, for example, "(8) is ...", it is regarded as listing an example, which may possibly lead to an erroneous renumbering result. It is advisable to start a paragraph with "The example (8) is ..." or the like when you need to make a reference at the outset of a paragraph. (If the reference is backward, i.e. it appears after the example, then the paragraph may start directly with an example number.)

  • Protect numbers not to be renumbered
    There may happen to be numbers which should not be treated as example numbers, as in the case of "(1)" in "John Doe (2009) 'A study of English phonetics (1): vowels'". A conceivable way to prevent such numbers from being renumbered will be to put a space between "(" and "1" and change its font size to 1pt, thus making it virtually invisible. There is no problem with expressions such as "(2009)", for numbers of four or more digits are not regarded as example numbers.
If a non-existent example, say (8), is referred to in the paper, Runumber will add "##" to the referring number in question, thus (8) becoming (##8). Erase "##", correct the number and run the macro again.

Runumber allows duplication of example numbers, since it is a common practice to list the same example twice, or to list related examples using the same number at different places, where the number is suffixed with as a, b, c, etc. or one or more primes. When you add new examples afterwards, you are advised to use sufficiently large numbers such as (1xx) or (9xx), where 'xx' denotes two digits, in order to prevent unintended duplication of example numbers.


Renumbering references in footnotes and endnotes

Runumber can renumber references, in footnotes and endnotes, to examples in the main text. To enable this functionality, rewrite "fn = False" (for footnotes) or "en = False" (for endnotes) at the beginning of the macro as "... = True".

Note that when this functionality is enabled, you may not use, in footnotes or endnotes, example numbers which are independent of those in the main text, unless some different format (including one where "(" and the number is separated by a tiny space) is employed for independent numbers in footnotes or endnotes.


For a More Convenient Use: Create a Button on the Menubar or Toolbar

You can create a button for Renumber on the menubar or toolbar so that you do not need to open the macro menu with [Alt]+[F8] each time you run Renumber.

(Word 2003)
This section has not been written yet. Make a web search to find the way to create a button on the menubar or toolbar with Word 2003.

        

(Word 2007/2010/2013)
Right-click on the Quick Access Toolbar and choose Customize Quick Access Toolbar. Select Macros from the pull-down menu labeled Choose commands from. Click on the macro name which contains Renumber, and click the [Add] button. Here you can optionally click the [Modify] button to apply an icon of your choice to this button. Finally, click [OK].

        

        


Related Software Which May Be of Interest

  Sort Bibliography
      Automatically sorts a bibliography by author or year of publication. See here for details. New!


Revision History

  1.00  Japanese version created (7 March 2009)
  1.10  English version made available (10 March 2009)
  1.20  Faster processing (24 September 2010)
  1.30  Added functionality to renumber references in footnotes and endnotes (30 September 2010)
  1.31  The previous versions had a problem when run while tracking changes with Word 2007. (2 June 2012)
  1.32  Now examples may be indented with tabs instead of (or together with) spaces. (25 July 2012)
  1.33  Now works properly regardless of the regional settings of Windows. (22 August 2012)
  • In order to update the macro, start the Visual Basic Editor, replace the old content with the current version, save the change by [Ctrl]+[S], and close the Visual Basic Editor.
  • If your paper cannot be renumbered correctly with Word 2003 or later, email it to me along with a description of the problem, the version of Windows, Word, etc. I will modify the macro if possible.

  Return to the top of the author's Website [Japanese]
  Tadaharu Tanomura, Osaka, Japan.