save endnotes to a separate document

G

Guest

Hi,

I've searched these groups and have tried a few of the suggestions already
given but none has worked. Here's hoping someone can assist me!

I have a long book manuscript. Right now each chapter is a separate section,
and I've asked the endnotes to appear at end of section, then suppressed them
until after the final chapter. (They are followed by a bibliography.) One
tricky thing is that each chapter's notes must start at 1.

I need to save all the notes in a separate Word document for submitting to
the publisher. I have tried (1) copying and pasting them (all the numbers
turn into "1" - as someone else on these groups already found!) and (2)
running Doug's macro (I ran into two problems: one is that the notes are now
all numbered sequentially, instead of starting again each chapter. The second
is that in the text I now have instead of a superscripted note, something
like "a204a". I know nothing about macros so I don't know how to adjust it to
make it work for me!)

Augh! Any suggestions for me? Thanks very much, in advance!

-shoofly
 
D

Doug Robbins - Word MVP

Try the following slightly modified macro:

Dim aendnote As Endnote
For Each aendnote In ActiveDocument.Endnotes
ActiveDocument.Range.InsertAfter vbCr & aendnote.Reference.Text &
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

The following part, which is unchanged from the original macro, replaces the
"a204a" (and similar numbers) with a superscripted 204

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
 
G

Guest

This macro solved one of the problems (now I don't have "a204a" but instead I
have superscript 204). Thanks!

But I still have two problems that the macro did not resolve:

one is, my endnotes at the end of the document now begin, not with their
number, but with a small box and then a tab. (I am pasting it in: but the
box doesn't show up here.)

second problem: the endnotes should restart at 1 at the end of every section
(each chapter of this book needs to have endnotes starting at 1), and the
macro numbers them consecutively.

Your advice is appreciated!

shoofly
 
G

Guest

Never mind -- I solved this by

1) making each chapter a separate document so that the endnotes would start
at 1 and go up consecutively

2) using the original macro of Doug's that has been floating around.

a little extra work, but not NEARLY what it would have been without that
fabulous macro!
 

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