The following is a modification of some code I created a while ago that
should do that. Don't use it until you are really finished with creating
the document, or run it on a copy of the document as it turns the end notes
into ordinary text and if you later add one, it will be treated as the first
end note in the document.
' 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
Dim refrange As Range
Dim i As Long
For Each aendnote In ActiveDocument.Endnotes
Set refrange = aendnote.Reference
refrange.Start = ActiveDocument.Range.Start
i = refrange.Sections.Count
ActiveDocument.Range.InsertAfter vbCr & i & " - " & 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
kgee said:
Does anyone know how to include the Chapter Number in the endnotes?
Similar to the way you can select the checkbox "Include Chapter Number"
for captions, but I do not see this option for my endnotes. I'd like
my endnotes to read 1-1, 1-2, 2-1, 2-2, etc. etc.
Also, I only want the chapter NUMBER, since my chapters are called
Chapter 1, Chapter 2, etc., I do not want to include the word Chapter
in the reference.