Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2012, 03:39 PM
macropod's Avatar
macropod macropod is offline Separating endnotes from text Windows 7 64bit Separating endnotes from text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,513
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


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]
Reply With Quote
  #2  
Old 01-27-2012, 10:43 AM
kenglade kenglade is offline Separating endnotes from text Mac OS X Separating endnotes from text Office for Mac 2011
Novice
Separating endnotes from text
 
Join Date: Dec 2011
Location: Rio Rancho, NM
Posts: 26
kenglade is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 06-13-2012, 09:09 AM
abarenberg abarenberg is offline Separating endnotes from text Windows 7 32bit Separating endnotes from text Office 2010 32bit
Novice
 
Join Date: Jun 2012
Posts: 1
abarenberg is on a distinguished road
Default Question about macro

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
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing footnotes to endnotes Sarah Word 3 04-27-2017 08:55 PM
Separating endnotes from text Copying endnotes kenglade Word 4 12-03-2011 01:26 PM
Index entries in endnotes perhj Word 0 06-19-2011 09:28 AM
Separating endnotes from text 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft