Reordering the footnotes

V

Vince

Hi,

I would like to re-order the footnotes in a document so that they are
continous. The way I read a footnote number is by doing:
a=footnotes(1).index. I can easily find out if they are numbered
continuously but I am not sure how to change the numbers if they aren't. Any
pointers?

Thanks a lot.
Vince
 
D

Doug Robbins

Maybe this macro will achieve what you want:

' Macro created by Doug Robbins to re-insert Footnotes

Dim afnRange As Range, afntext As String, i As Integer

For i = 1 To ActiveDocument.Footnotes.Count

ActiveDocument.Footnotes(i).Reference.Select

Selection.Characters(1).Select

If Not Selection.Style = "Footnote Reference" Then

While Not Selection.Style = "Footnote Reference"

Selection.Collapse wdCollapseStart

Selection.MoveLeft wdCharacter

Selection.Characters(1).Select

Wend

Selection.Delete

End If

Set afnRange = ActiveDocument.Footnotes(i).Range

afntext = afnRange.Text

ActiveDocument.Footnotes(i).Delete

ActiveDocument.Footnotes.Add Range:=Selection.Range, Text:=afntext



Next i

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
V

Vince

You MVPs are truly amazing!!
How do you do it? The same thing would probably have taken me more code /
more time and more thinking (if I would manage to solve it)
Thanks a million.
Vince
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top