Okay, here's the macro, with some additional notes below.
This macro will set endnotes to end of section and suppress endnotes for all
sections but the next-to-last section. If you want the endnotes to appear in
front of the last section, you can use this macro with no changes.
Sub AppendixAfterEndnotes()
'
' sets endnote location to end of section:
With ActiveDocument.Endnotes
.Location = wdEndOfSection
End With
' sets all sections to have endnotes suppressed:
ActiveDocument.Sections.PageSetup.SuppressEndnotes = True
' tells Word not to suppress endnotes for the next to last (³numSections-1²)
section:
Dim numSections
numSections=ActiveDocument.Sections.Count
If numSections> 1 then
ActiveDocument.Sections(numSections-1).PageSetup.SuppressEndnotes = False
End if
End Sub
If you perhaps have several sections (e.g. an index AND a bibliography)
after the notes, you will need to modify the code slightly. If you want the
endnotes to appear in front of two or three sections, then you may need to
change the code to read ³(numSections-2)² or ³(numSections-3)²,
respectively.
See also, if necessary:
What do I do with macros sent to me by other newsgroup readers to help me
out?
I don't know how to install them and put them to use
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
I'm still not quite sure about the Endnotes page number....if the section
with endnotes in it has page numbers, then the TOC will pick that up as well
as the title. So the answer seems too simple, I'm afraid I'm
misunderstanding your question. To make sure it has page numbers, View |
Headers/Footers and enter some if necessary, but if you have entered them in
the rest of the doc, the endnotes will probably already have them. Be sure
to read the Create A TOC link in my last post so that you understand how
the TOC works, then you will find it simple to extend to the Bibliography
and Endnotes.
Re making sure the TOC will pick up the title--the endnotes will appear at
the end of a section, directly after the text. You probably want to Insert
a Page Break after the text, then type the title Endnotes, *then* let the
endnotes start. You will need to delete the idiotic "endnote separators"
that Word will put in there as a line before the endnotes and at the top of
many pages. To do that, switch into Normal View and go to View | Footnotes.
A footnote pane will open up at the bottom. Use the dropdown menu at the
top of the pane to access the separators (Endnote Separator and Endnote
Continuation Separator) and edit or delete as desired.
Let us know if that doesn't cover it. Actually, you may also find this link