Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Footnote Hell (Word 97, NT 4.0)

    Just as I had problems with endnotes...another user is having footnote problems. The footnotes in his document will not update.

    I deleted the footnote from the paragraph marker, nothing. I deleted the line it was on as well as the lines immediately above and below. When I try to insert a footnote, it counts the deleted footnotes.

    IE: The previous footnote is 19. The next footnote ought to be 20, right? No, it's 24! Because 20 through 23 were created but deleted...only the system isn't reading that.

    Any thoughts? <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Footnote Hell (Word 97, NT 4.0)

    I created and tested this procedure in Word 2000. It goes through and changes all footnotes to auto-numbering. Because I could not find a way to do that directly, I copy, delete, recreate, and paste the non-auto-numbered footnotes. Hope this helps.
    <pre>Sub FootnoteRenum()
    Dim fns As Footnotes, intFnCount As Integer, lngRestoreHere
    'Set object reference to the footnotes collection
    Set fns = ActiveDocument.Footnotes
    'Set the default numbering rule (do not restart every page)
    fns.NumberingRule = wdRestartContinuous
    'Loop through the collection checking the reference numbers
    For intFnCount = 1 To fns.Count
    If fns(intFnCount).Reference.Text <> Chr(2) Then
    'This one was manually numbered! Copy the FN
    fns(intFnCount).Range.Copy
    'Capture the point in the document to reinsert it
    lngRestoreHere = fns(intFnCount).Reference.Start
    'Delete it
    fns(intFnCount).Delete
    'Insert a blank, autonumbered FN where you deleted from
    fns.Add Range:=ActiveDocument.Range(Start:=lngRestoreHere, _
    End:=lngRestoreHere)
    'Restore the contents of the footnote from the clipboard
    fns(intFnCount).Range.Paste
    End If
    Next
    'Clean up objects
    Set fns = Nothing
    End Sub</pre>


    For the endnotes case, you need to change the following lines:

    Dim fns As <font color=blue>Endnotes</font color=blue>, intFnCount As Integer, lngRestoreHere

    Set fns = ActiveDocument.<font color=blue>Endnotes</font color=blue>

    I say this without actually testing it, however!

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Footnote Hell (Word 97, NT 4.0)

    This procedure is simpler. I knew that if I selected a footnote's reference number (in the main text) and called up Insert|Footnote, I could change the numbering from custom to auto. So I recorded myself doing that and changed the active parts of the above procedure to use that technique:
    <pre>Sub FootnoteRenumB()
    Dim fns As Footnotes, intFnCount As Integer, lngRestoreHere
    'Set object reference to the footnotes collection
    Set fns = ActiveDocument.Footnotes
    'Set the default numbering rule (do not restart every page)
    fns.NumberingRule = wdRestartContinuous
    'Loop through the collection checking the reference numbers
    For intFnCount = 1 To fns.Count
    If fns(intFnCount).Reference.Text <> Chr(2) Then
    'This one was manually numbered! Select the reference number
    fns(intFnCount).Reference.Select
    'Now change it to auto-numbered a la Insert|Footnote
    fns.Add Range:=Selection.Range, Reference:=""
    End If
    Next
    'Clean up objects
    Set fns = Nothing
    End Sub</pre>

    This is simpler and doesn't take over the clipboard, so it probably is better, even though the syntax is totally illogical if you don't know how Word works interactively.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Footnote Hell (Word 97, NT 4.0)

    It sounds like the deleted footnotes have been revision tracked. Make sure the deleted fields have been truly removed by checking that there are no tracked revisions in the document.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Footnote Hell (Word 97, NT 4.0)

    Thank you for your suggestions...I'll try the revision tracking first as it may be easiest...but I'm very grateful for the help!

    I'll let you know how it goes. Turns out the footnote problem had something to do with a corrupt file and was basically recreated...

  6. #6
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Footnote Hell (Word 97, NT 4.0)

    Thanks A BUNCH! I know nothing about VB but I recreated what you have here and it did the trick! I can't thank you enough.

    I'm not sure, after seeing the results of your VERY HELPFUL trick, that the user was in fact using endnotes in the firstplace. Explaining why he had multiple with the same number!

    YOU ROCK!!! <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •