View Single Post
 
Old 05-20-2012, 03:37 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
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 BC,

Trying to convert footnotes to plain text and keeping them on the same page(s) as the footnotes from which they were derived is a real minefield. Converting endnotes is much easier though. Try:
Code:
Sub UnLinkEndNotes()
Application.ScreenUpdating = False
Dim nRng As Range, eNote As Endnote, nRef As String
With ActiveDocument
  For Each eNote In .Endnotes
    With eNote
      With .Reference.Characters.First
        .Collapse wdCollapseStart
        .InsertCrossReference wdRefTypeEndnote, wdEndnoteNumberFormatted, eNote.Index
        nRef = .Characters.First.Fields(1).Result
        .Characters.First.Fields(1).Unlink
      End With
      .Range.Cut
    End With
    If .Range.EndnoteOptions.Location = wdEndOfSection Then
      Set nRng = eNote.Range.Sections.First.Range
    Else
      Set nRng = .Range
    End If
    With nRng
      .Collapse wdCollapseEnd
      .End = .End - 1
      If .Characters.Last <> Chr(12) Then .InsertAfter vbCr
      .InsertAfter nRef & " "
      With .Paragraphs.Last.Range
        .Style = "Endnote Text"
        .Words.First.Style = "Endnote Reference"
      End With
      .Collapse wdCollapseEnd
      .Paste
      If .Characters.Last = Chr(12) Then .InsertAfter vbCr
    End With
  Next
  For Each eNote In .Endnotes
    eNote.Delete
  Next
End With
Set nRng = Nothing
Application.ScreenUpdating = True
End Sub
Footnotes can be converted in essentially the same way, but they effectively become another series of endnotes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote