Soldato
I need to do this in Word 2003 so that when I paste the endnotes into a separate document, the numbers don't all turn into '1'. I've found this macro online but it's failing to run. "Compile error: Invalid Outside Procedure"
Any ideas?
Any ideas?
Code:
' Macro created 29/09/99 by Doug Robbins to replace footnotes with textnotes
at end of document
' to replace the footnote reference in the body of the document with a
superscript number.
'
Dim afnote As Endnote
For Each afnote In ActiveDocument.footnotes
ActiveDocument.Range.InsertAfter vbCr & afnote.Index & vbTab &
afnote.Range
afnote.Reference.InsertBefore "a" & afnote.Index & "a"
Next afnote
For Each afnote In ActiveDocument.Footnotes
afnote.Reference.Delete
Next afnote
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
Last edited: