Thank you, Doug
That works exactly as you said it would. A slight problem for me is that the documents I work on (I'm a copy-editor) have the notes
numbered by chapter (section break), and your macro converts them to a single continuous sequence, so I'd still need to renumber
everything after the first section manually. (Or I suppose I could divide it up, run the macro on each section and then recombine
it.)
Regarding footnote/endnote placement, the most common scenario is that I'm asked to move all footnotes to the end of the document,
so I can convert them from footnotes to endnotes in Word first, and then run your macro (since I wouldn't have a clue how to modify
it).
Occasionally, though, I need to leave the footnotes where they are, but still unlink them. I don't suppose you've written a macro
for that too, have you? :-)
Thanks again
Trevor
The following will replace endnotes with ordinary text at the end of the document, retaining the endnote reference number in the
text, but it can not longer be clicked to go to the text note.
You could modify it to replace footnotes with ordinary text at the end of the document, but getting them at the foot of the page
on which they now appear would be very difficult to do strictly with code.
' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes at end of document
' to replace the endnote reference in the body of the document with a superscript number.
'
Dim aendnote As Endnote
For Each aendnote In ActiveDocument.Endnotes
ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab & aendnote.Range
aendnote.Reference.InsertBefore "a" & aendnote.Index & "a"
Next aendnote
For Each aendnote In ActiveDocument.Endnotes
aendnote.Reference.Delete
Next aendnote
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Superscript = True
End With
With Selection.Find
.Text = "(a)([0-9]{1,})(a)"
.Replacement.Text = "\2"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Post by TrevorCan this be done with a macro?
Can this be done at all without third-party software?