Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-03-2011, 12:46 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Copying endnotes Windows 7 64bit Copying endnotes Office 2010 32bit
Moderator
 
Join Date: Aug 2011
Posts: 4,036
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

The following code was created by Doug Robbins:


Code:
 
' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes at end of document 
 
' and replace the endnote reference in the body of the document with a superscript number. 
 
' 
 
Dim aendnote As Endnote 
 
For Each aendnote In ActiveDocument.Endnotes 
 
ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab & aendnote.Range 
 
aendnote.Reference.InsertBefore "a" & aendnote.Index & "a" 
 
Next aendnote 
 
For Each aendnote In ActiveDocument.Endnotes 
 
aendnote.Reference.Delete 
 
Next aendnote 
 
Selection.Find.ClearFormatting 
 
Selection.Find.Replacement.ClearFormatting 
 
With Selection.Find.Replacement.Font 
 
.Superscript = True 
 
End With 
 
With Selection.Find 
 
.Text = "(a)([0-9]{1,})(a)" 
 
.Replacement.Text = "\2" 
 
.Forward = True 
 
.Wrap = wdFindContinue 
 
.Format = True 
 
.MatchWildcards = True 
 
End With 
Selection.Find.Execute Replace:=wdReplaceAll

For assistance, see http://www.gmayor.com/installing_macro.htm.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing footnotes to endnotes Sarah Word 3 04-27-2017 08:55 PM
Index entries in endnotes perhj Word 0 06-19-2011 09:28 AM
Copying endnotes how do I change fonts for endnotes of word 2007? Brent Word 5 02-01-2011 03:15 PM
Copying endnotes Copying autotext jafrapatty Office 3 01-30-2011 01:11 AM
Copying endnotes Copying forms herfi Word VBA 2 01-25-2011 06:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:05 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