reformat endnote

  • Thread starter Thread starter jane a.
  • Start date Start date
J

jane a.

word formatted my endnotes into superscripted numbers. i need to change
those into regular (no superscript) numbers surrounded by brackets. can
somebody please help me with this?

thank you.
 
If you run the following macro, it will convert the endnotes to textnotes at
the end of the document and it would put brackets around the endnote
reference. You should save the document before running this macro and save
it with a new name after running it in case you want to go back and make
changes to the document.

' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes
at end of document

' to put brackets around the endnote reference in the body of the document.

'

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

.Text = "(a)([0-9]{1,})(a)"

.Replacement.Text = "(\2)"

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
thank you so much!
-j

Doug Robbins - Word MVP said:
If you run the following macro, it will convert the endnotes to textnotes at
the end of the document and it would put brackets around the endnote
reference. You should save the document before running this macro and save
it with a new name after running it in case you want to go back and make
changes to the document.

' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes
at end of document

' to put brackets around the endnote reference in the body of the document.

'

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

.Text = "(a)([0-9]{1,})(a)"

.Replacement.Text = "(\2)"

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

jane a. said:
word formatted my endnotes into superscripted numbers. i need to change
those into regular (no superscript) numbers surrounded by brackets. can
somebody please help me with this?

thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top