Reformatting Endnote numbers in Word2K

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am editing a doc prepared by someone else that has endnotes. The note
references in the body text are superscripted; that's what I want. But
they're also superscripted in the notes themselves. That's not what I want. I
want them to be normal, the same size and position as the note text itself.
Is there a way to change only that aspect of the note reference? When I try
to do it by modifying the style, it changes the note ref in the body of the
article too. I would also like them to include a period following the note
reference in the note too.
 
Using the following macro you could do it, but they would no longer be
endnotes.

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

' to 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

--
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
 
To unsuperscript after the fact, I just did a quick test and this appears to
work, though I tested with footnotes. Usually footnotes and endnotes behave
the same, but TEST ON A COPY OF YOUR DOC.

Put the cursor in an endnote, so that the Find and Replace will run on the
endnotes.

Bring up the Find and Replace dialog (ctrl-F, click on Replace).

Click More in the F&R dialog, so that you can use the Format menu in the
dialog.

Format the empty Find box as Format-Style-Endnote Reference

Format the empty Replace box as Format-Font-Not Superscript. In my test, I
clicked the superscript box twice to clear it, and it came out right, and
also as Not Subscript.

Click Replace to test.

In my version (MacWord 2004), if it starts on the endnotes, it only searches
the endnotes. So I was then able to click Replace All without affecting my
main text. That's why you are testing this ON A COPY.

The period is much trickier. You can tell Find to find footnote markers, but
you can't tell it to replace footnote markers, even with themselves, though
you could use some code to say "find the footnote marker, go to just after
it, and insert a period and two spaces". Only I don't know how. You could
ask in a Word VBA/Programming group or possibly Doug Robbins will see this
and provide. :)

Alternatively, using wildcards, I suspect you could tell Word to find the
space at the beginning of the line that is formatted in Endnote Text style,
or the space that is preceded by a number, and to replace that space with
say, period tab or period space space. But I don't quite know how to set up
the find. You can set it up similarly to above and spend a lot of time
manually skipping the spaces that aren't at the beginning of the line. You'd
probably want to sort out keyboard shortcuts for Find Next and Replace if
you plan to do that.

You might find help with setting up the sophisticated F&R here:
http://gmayor.com/replace_using_wildcards.htm
 

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