Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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,142
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 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
 

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 03:42 PM.


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