B
bruno
Hi,
Re. "VBA Macro for Footnotes" - convert footnote numbers to pure text and
add the footnotes as a list at the end of the document, without any other
references than the numbers - in Word 2003 SP3.
Similar matter was dealt with in recent conversation "VBA Macro For
FootNotes" (5/25/2009) - where the list of footnotes was to be placed in a
new document -, and i also found an older conversation "Convert footnotes to
ordinary text" (sept. 2007) where the footnote text was to be put directly in
the body text.
By combining the solutions found there I think it should be no problem to
get the solution to my requirement, but it is not as simple as that, at least
not for someone like me: my skills go scarcely beyond using the macro
recorder.
Below i add my macro which I combined of the codes suggested in above
mentioned conversations. It stops at the first appearence of
rngfoot.Range.InsertParagraphAfter
Could someone please tell me what is wrong ?
sub
Dim docfoot As Footnotes
Dim i As Long
Dim rngfoot As Range
Dim fn As Word.Footnote
Dim rngFN As Word.Range
If ActiveDocument.Footnotes.Count > 0 Then
Set docfoot = ActiveDocument.Footnotes
Else
MsgBox "There are no footnotes in this document.", _
vbExclamation, "Exit"
Exit Sub
End If
Set rngfoot = ActiveDocument.Sections.Last
rngfoot.Range.InsertParagraphAfter
rngfoot.Range.InsertParagraphAfter
With docfoot
For i = 1 To .Count
rngfoot.Range.InsertAfter .Item(i).Range.Text
rngfoot.Range.InsertParagraphAfter
Set fn = ActiveDocument.Footnotes(i)
Set rngFN = fn.Reference
rngFN.Collapse wdCollapseEnd
rngFN.Range.InsertAfter "[ & i & ]"
fn.Delete
Next
End With
End Sub
It cost me a lot of time to come so far, was it all in vain?
bruno
Re. "VBA Macro for Footnotes" - convert footnote numbers to pure text and
add the footnotes as a list at the end of the document, without any other
references than the numbers - in Word 2003 SP3.
Similar matter was dealt with in recent conversation "VBA Macro For
FootNotes" (5/25/2009) - where the list of footnotes was to be placed in a
new document -, and i also found an older conversation "Convert footnotes to
ordinary text" (sept. 2007) where the footnote text was to be put directly in
the body text.
By combining the solutions found there I think it should be no problem to
get the solution to my requirement, but it is not as simple as that, at least
not for someone like me: my skills go scarcely beyond using the macro
recorder.
Below i add my macro which I combined of the codes suggested in above
mentioned conversations. It stops at the first appearence of
rngfoot.Range.InsertParagraphAfter
Could someone please tell me what is wrong ?
sub
Dim docfoot As Footnotes
Dim i As Long
Dim rngfoot As Range
Dim fn As Word.Footnote
Dim rngFN As Word.Range
If ActiveDocument.Footnotes.Count > 0 Then
Set docfoot = ActiveDocument.Footnotes
Else
MsgBox "There are no footnotes in this document.", _
vbExclamation, "Exit"
Exit Sub
End If
Set rngfoot = ActiveDocument.Sections.Last
rngfoot.Range.InsertParagraphAfter
rngfoot.Range.InsertParagraphAfter
With docfoot
For i = 1 To .Count
rngfoot.Range.InsertAfter .Item(i).Range.Text
rngfoot.Range.InsertParagraphAfter
Set fn = ActiveDocument.Footnotes(i)
Set rngFN = fn.Reference
rngFN.Collapse wdCollapseEnd
rngFN.Range.InsertAfter "[ & i & ]"
fn.Delete
Next
End With
End Sub
It cost me a lot of time to come so far, was it all in vain?
bruno