How to keep the end note numberings permanently

R

roland

I have used the Insert Endnote facility to insert numbered references
at the end of a document. I know want to split the manuscript into
two
separate files, one with the text and another with the references. Is
it possible to keep the endnote numbers in the text and the reference
file? I learned to do this for the crossreferences by pressing ctrl-
shift-F9. I want a similar solution for the end note numbers.
 
S

Stefan Blom

Doug Robbins has posted a macro that does this. You may want to try it
on a copy of the document first:

Sub ReplaceEndnotes()


' Macro created 29/09/99 by Doug Robbins to replace endnotes
'with textnotes
'at end of 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.Replacement.Font

.Superscript = True

End With

With Selection.Find

.Text = "(a)([0-9]{1,})(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

.Replacement.Text = "\2"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll

End Sub

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
R

roland

This macro is what I neede but it did not work.

I found out another swede had had problems with this macro discussed
in this line:

http://groups.google.se/group/micro...id+patternmatch&rnum=1&hl=sv#84b28df76b6397d9

I finaly found why the macro did not work. The line

..Text = "(a)([0-9]{1,})(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

should be
..Text = "(a)([0-9]*)(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

in the swedish version of Word2003

Greetings

Roland Andersson




Doug Robbins has posted a macro that does this. You may want to try it
on a copy of the document first:

Sub ReplaceEndnotes()

' Macro created 29/09/99 by Doug Robbins to replaceendnotes
'with textnotes
'at end of 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.Replacement.Font

.Superscript = True

End With

With Selection.Find

.Text = "(a)([0-9]{1,})(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

.Replacement.Text = "\2"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll

End Sub

--
Stefan Blom
Microsoft Word MVP

in message



I have used the Insert Endnote facility to insert numbered references
at the end of a document. I know want to split the manuscript into
two
separate files, one with the text and another with the references. Is
it possible to keep the endnote numbers in the text and the reference
file? I learned to do this for the crossreferences by pressing ctrl-
shift-F9. I want a similar solution for the end note numbers.- Dölj citerad text -

- Visa citerad text -
 
S

Stefan Blom

Glad you got it sorted and thank you for the feedback.

It is odd that the macro didn't work for you; it certainly worked on
my Swedish version of Word 2000. Must be a bug with Word 2003 (which I
currently do not have access to).

--
Hälsningar
Stefan Blom
Microsoft Word MVP


in message
This macro is what I neede but it did not work.

I found out another swede had had problems with this macro discussed
in this line:

http://groups.google.se/group/micro...id+patternmatch&rnum=1&hl=sv#84b28df76b6397d9

I finaly found why the macro did not work. The line

..Text = "(a)([0-9]{1,})(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

should be
..Text = "(a)([0-9]*)(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

in the swedish version of Word2003

Greetings

Roland Andersson




Doug Robbins has posted a macro that does this. You may want to try it
on a copy of the document first:

Sub ReplaceEndnotes()

' Macro created 29/09/99 by Doug Robbins to replaceendnotes
'with textnotes
'at end of 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.Replacement.Font

.Superscript = True

End With

With Selection.Find

.Text = "(a)([0-9]{1,})(a)" 'Use ";" instead of ","
'if you're using comma as a
'decimal sign.

.Replacement.Text = "\2"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True

End With

Selection.Find.Execute Replace:=wdReplaceAll

End Sub

--
Stefan Blom
Microsoft Word MVP

in message



I have used the Insert Endnote facility to insert numbered references
at the end of a document. I know want to split the manuscript into
two
separate files, one with the text and another with the references. Is
it possible to keep the endnote numbers in the text and the reference
file? I learned to do this for the crossreferences by pressing ctrl-
shift-F9. I want a similar solution for the end note numbers.-
Dölj citerad text -

- Visa citerad text -
 

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

Top