VBA Code to Update Numerical Superscripts in Word RRS feed

  • Question

  • Hi,

    I am trying to write a VBA macro that will update the list of numerical superscripts int eh word document every time a new numerical superscript is inserted. So for example, if my document has the following superscripts: 1, 2, 3, 4, 5, 6 and I insert a new numerical superscript at the beginning of the document and get 10, 1, 2, 3, 4, 5, 6. After running the macro and updating the numerical superscripts I get :1, 2, 3, 4, 5, 6, 7. Thanks in advance.

    Sunday, September 8, 2013 9:06 AM

All replies

  • No doubt the other 25 people who looked at this question are equally baffled about what it is that you mean. What is the context of these 'superscripts'? How are they created or used and in what way do they need updating?

    Graham Mayor - Word MVP

    Sunday, September 8, 2013 1:30 PM
  • I am sorry if my question was vague. I will give an example. The following is a snapshot of a paragraph from a Word document (Word 2013). The superscripts basically indicate a the number of a reference in the list of references.

    Now suppose i decide later that i need to insert another reference on the second line so instead of having "1-3" I will need to have "1-4", however by doing that i will need to maintain the sequential nature of the superscripts: the other superscripts in the paragraph need to be changed. So I will need to change "4,5" to "5,6", "6" to "7", "7" to "8" etc..

    What I would like to write is a macro that will update the superscripts in the document (to maintain the sequential nature) after a new superscript is inserted, instead of manually doing this. Thanks again!

    Sorry I am not able to insert pictures for some reason. Please click on the link above
    • Edited by PC_Meister Sunday, September 8, 2013 10:17 PM Added picture
    Sunday, September 8, 2013 9:54 PM
  • If you used cross references to place the numbers then they should renumber automatically (or if not CTRL+A then F9 will do so, or for a macro update solution see the example macro at ) .

    If you didn't use cross references, perhaps you should bite the bullet and do so as this will get difficult to maintain otherwise as no doubt you are finding.

    Graham Mayor - Word MVP

    Monday, September 9, 2013 6:31 AM
  • Graham,

         In MS Word 2007, how does one create the type of footnote shown in some of the OP's examples, where a single phrase might have multiple footnotes:

    e.g:  Lorem<sup>1-3</sup> or Lorem<sup>4,6</sup>.

    EDIT: The superscripts did not come out, but I think you can see from the code what I wanted. e.g Lorem[1-3]  or Lorem[4,6]  with the footnote numbers superscripted, and without the square brackets.

        I don't see an option for that.



    Monday, September 9, 2013 10:53 AM
  • The more I think about this the more complicated it becomes - may help, though I doubt it

    Graham Mayor - Word MVP

    Monday, September 9, 2013 1:30 PM
  • The paragraph titled "When I cite multiple sources, I want to show the reference numbers as 1-6, instead of 1,2,3,4,5,6." helped, but in my Word, if I cite multiple sources, the footnotes are not separated by anything.  In other word, inserting footnotes 9, 10 and 11 looks like:  lorem[91011] (with the 9 10 and 11 superscripted).

    Do the superscripted commas have to be added manually?


    Monday, September 9, 2013 2:25 PM