Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2017, 11:53 AM
romanticbiro romanticbiro is offline vba code for footnote & endnote Windows 7 32bit vba code for footnote & endnote Office 2003
Advanced Beginner
vba code for footnote & endnote
 
Join Date: Feb 2014
Posts: 42
romanticbiro is on a distinguished road
Question vba code for footnote & endnote

hello dears



please help me to manage this task, i've some documents contain big number of footnote and end note, i need to convert their references and footnotes / endnotes text to normal text in body document (body text)
and if possible put them between prackets (reference #) (footnote text / endnote text)
thanks for your great support.
Reply With Quote
  #2  
Old 02-11-2017, 10:33 PM
macropod's Avatar
macropod macropod is online now vba code for footnote & endnote Windows 7 64bit vba code for footnote & endnote Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Word cannot convert footnote references or endnote references to normal text and keep the footnotes or endnotes intact. Although a macro could be used to preserve any endnote content - since they only appear at the end of the relevant Sections - doing the same for footnotes is fraught with difficulty. The simplest way to achieve such an outcome is to save the document as a PDF, then reimport the PDF into Word.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-11-2017, 10:49 PM
gmayor's Avatar
gmayor gmayor is offline vba code for footnote & endnote Windows 10 vba code for footnote & endnote Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Maybe something like
Code:
Sub Foot_EndNotesToText()
Dim oFNote As Footnote
Dim oENote As EndNote
Dim iRef As Integer
Dim sRef As String
Dim orng As Range
    For Each oFNote In ActiveDocument.Footnotes
        With oFNote
            iRef = .Index
            sRef = .Range.Text
            Set orng = .Reference
            .Delete
            orng.Text = "(reference " & iRef & ") (" & sRef & ")"
        End With
    Next oFNote
    For Each oENote In ActiveDocument.Endnotes
        With oENote
            iRef = .Index
            sRef = .Range.Text
            Set orng = .Reference
            .Delete
            orng.Text = "(reference " & iRef & ") (" & sRef & ")"
        End With
    Next oENote
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba code for footnote & endnote Convert endnote/footnote to regular text Cobb78 Word 5 07-11-2016 06:23 AM
vba code for footnote & endnote How to keep the footnote(endnote) reference numbers when pasting text between two documents? gn4619 Word 4 10-22-2015 08:01 AM
vba code for footnote & endnote VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
vba code for footnote & endnote VBA code to read number of footnote and enter in text rekent Word VBA 2 05-13-2014 06:53 AM
vba code for footnote & endnote Endnote in footnote? kerstin Word 2 06-26-2011 11:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:56 AM.


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