![]() |
|
|
|
#1
|
||||
|
||||
|
Hi Ken, On a PC, if you access a footnote or endnote range and press Ctrl-A, that selectes all the footnotes or endnotes in the document. You can then use the normal copy/paste commands to replicate them in a new document. The only 'issues' with this are that: a) you can't delete footnotes or endnotes from the original document this way; and b) the paste footnotes or endnotes all end up numbered 1 in the new document. A macro can easily enough address both issues: Code:
Sub ExtractEndNotes()
Application.ScreenUpdating = False
Dim Rng As Range, i As Long, Doc As Document
With ActiveDocument
If .Endnotes.Count = 0 Then Exit Sub
For i = 1 To .Endnotes.Count
Set Rng = .Endnotes(i).Reference
With Rng
.Collapse wdCollapseEnd
.Text = i
.Style = "Endnote Reference"
End With
Next
.StoryRanges(wdEndnotesStory).Copy
For i = .Endnotes.Count To 1 Step -1
.Endnotes(i).Delete
Next
End With
Set Doc = Documents.Add
With Doc.Range
.Paste
With .Find
.ClearFormatting
.Text = ""
.Style = "Endnote Reference"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Do While .Find.Found
i = i + 1
.Text = i
.Collapse wdCollapseEnd
.Find.Execute
Loop
.Characters.Last.Delete
End With
Set Rng = Nothing: Set Doc = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Hi, Paul
Many thanks for your note. Sad to say, it isn't working on my Mac. Here's what's happening. Say this is my original: Now is the time[i] [i] For all good men Using a macro provided by Stefan, I can change the endnote to look like this: Now is the time a1a 1 For all good men I can now Cmd-X on the enddnote and move it to a separate document. But that leaves me with this in the original: Now is the time a1a a1a has replaced the superscript 1. I would ahve to go back through the original and change every aXa to a superscript. I have no idea how to do this and I don't think it would be productive to try. For some reason MS has decided to make it impossible to separate the endnotes from the original. Seems to me they never gave it a second thought. That's what I call half-ass work. Saludos, Ken For |
|
#3
|
|||
|
|||
|
Thanks so much for posting this. I have been searching for weeks for just such a solution. I'm submitting a book to a publisher and am required to put the endnotes into a separate file, and I couldn't figure out how to cut them and paste them into a new document.
Could I trouble you for more advice on this -- how do I change the format of the detached endnotes? That is, could I change them so that they are formatted as: 1. Smith. [2 spaces between the '.' and 'Smith'] Rather than the following that the macro generates: 1 Smith. Thanks in advance! Alan Barenberg |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing footnotes to endnotes | Sarah | Word | 3 | 04-27-2017 08:55 PM |
Copying endnotes
|
kenglade | Word | 4 | 12-03-2011 01:26 PM |
| Index entries in endnotes | perhj | Word | 0 | 06-19-2011 09:28 AM |
how do I change fonts for endnotes of word 2007?
|
Brent | Word | 5 | 02-01-2011 03:15 PM |
| Separating accounts | aka252 | Outlook | 0 | 02-23-2006 07:55 PM |