Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to automatically modify the appearence of the endnote reference

97 views
Skip to first unread message

Doug Robbins - Word MVP

unread,
Jan 13, 2003, 8:31:29 AM1/13/03
to

Hi Janne,

The following macro could be modified to do what you want:

' 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

Please post any response to the newsgroups for the benefit of others who may
also be following the thread.

Hope this helps,
Doug Robbins - Word MVP
"Janne Maaranen" <janne.m...@borealisgroup.com> wrote in message
news:4c1e01c2badc$b7d07a60$cef82ecf@TK2MSFTNGXA08...
>
> How is it possible to change the appearence of the
> endnote/footnote reference number itself in the end
> section in Word 97?
>
> I mean, instead of having the endnote/footnote as a
> superscript in the end, I'd like the number to appear as
> normal or bold text followed by a full stop symbol, but
> the way how the footnotes/endnotes appear in the body text
> (as superscripts) should still stay the same.
>
> BR Janne
>
>


Larry

unread,
Jan 13, 2003, 1:33:22 PM1/13/03
to
Doug,

Thanks for this useful and needed macro.

But, still, it's amazing to me that such radical steps (replacing the
endnotes with regular text) are needed just to have the reference
numbers in the endnotes section of the document not appear as
superscript. Clearly Word needs to have separate styles for the
reference numbers in the main text and the reference numbers in the
endnotes/footnotes section itself.

Larry


Larry

unread,
Jan 13, 2003, 2:43:21 PM1/13/03
to
And this could be done whereby the style for the endnote references in
the endnote section is based by default on the style for the endnote
references in the main text, but could be changed to something else if
the user desires. That way it wouldn't ordinarily be necessary to
customize two different styles, but it could be done if the user wants
to.

Larry


Doug Robbins - Word MVP

unread,
Jan 14, 2003, 5:18:20 AM1/14/03
to

Hi Janne,

reur problem with the macro, I just ran it again here without problems.

See if the information in the article "Flush bad karma from Word's find
facility after an unsuccessful wildcard search" at:

http://www.mvps.org/word/FAQs/MacrosVBA/FlushFR.htm

helps get rid of the problem.

0 new messages