![]() |
|
#1
|
|||
|
|||
|
Hello people,
i would like to convert thousands of footnotes, that have certain properties to endnotes. code that does not work correctly: Code:
Sub ConvertFootnotesEndnotes02()
Dim CertainFN As Footnote
For Each CertainFN In ActiveDocument.Footnotes
Selection.Find.Style = ActiveDocument.Styles("Endnote")
With Selection.Find
.Text = "$$$"
.Replacement.Text = "§§§"
CertainFN.Range.Footnotes.Convert
End With
Next CertainFN
lbl_Exit:
Exit Sub
End Sub
would someone please help me? |
|
#2
|
|||
|
|||
|
Maybe:
Code:
Sub ConvertFootnotesEndnotes02()
Dim CertainFN As Footnote
For Each CertainFN In ActiveDocument.Footnotes
If InStr(CertainFN.Range.Text, "$$$") > 0 Then
CertainFN.Range.Text = Replace(CertainFN.Range.Text, "$$$", "§§§")
CertainFN.Reference.Footnotes.Convert
End If
Next CertainFN
lbl_Exit:
Exit Sub
End Sub
|
|
#3
|
|||
|
|||
|
Dear Craig,
thank you very much for your kind help. Your code works excellently for me. Unfortunately, the search term "§§§" has an unfavorable position. It stands directly in front of the footnote sign in the footnote with style "Endnote" and can't be found this way. But by a small trick I could change the default and managed to do the job with your code. Thank you |
|
#4
|
|||
|
|||
|
Although i applied character style formats before converting to endnotes, I just noticed that the character styles are lost during conversion.
Is there a way to avoid this failure during conversion? Edit: This only occurs with Word 2003 With Word 2016 it works like a charm Last edited by Brainiac; 07-02-2019 at 06:59 AM. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Footnotes / Endnotes? | See attachment
|
modene1 | Word | 2 | 05-17-2017 02:53 AM |
| Changing footnotes to endnotes | Sarah | Word | 3 | 04-27-2017 08:55 PM |
How to display the full citation in footnotes/endnotes
|
chakyt22 | Word | 1 | 09-29-2015 03:37 AM |
Converting hard-entered endnotes to footnotes?
|
New Daddy | Word VBA | 1 | 10-21-2012 02:51 PM |
Endnotes within Footnotes?
|
elias | Word | 12 | 09-04-2012 04:12 PM |