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

Convert footnotes to ordinary text

145 views
Skip to first unread message

Fredrik E. Nilsen

unread,
Sep 7, 2007, 9:22:02 AM9/7/07
to
Hello,

I have a large document with several hundred footnotes. I'm looking
for a code to replace the footnote reference with the actual footnote
text. Any ideas on where to start?

--
Fredrik E. Nilsen

Shauna Kelly

unread,
Sep 7, 2007, 9:54:14 AM9/7/07
to
Hi Fredrik

The following should get you started:

Sub ReplaceFootnotesWithTheirText()

Dim nCounter As Long
Dim fn As Word.Footnote
Dim rngFN As Word.Range

For nCounter = ActiveDocument.Footnotes.Count To 1 Step -1
'Get a reference to our footnote
Set fn = ActiveDocument.Footnotes(nCounter)

'Work out where to copy the text
Set rngFN = fn.Reference
rngFN.Collapse wdCollapseEnd

'Copy the text of the footnote into the body of the document
rngFN.FormattedText = fn.Range.FormattedText

'Delete the footnote
fn.Delete

Next nCounter

End Sub


Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Fredrik E. Nilsen" <fenilse...@chello.no> wrote in message
news:7tj2e3lfjk98tkm14...@4ax.com...

Fredrik

unread,
Sep 8, 2007, 3:50:20 AM9/8/07
to
Not only did it get me started, it worked like a charm right out of
the box. Thanks a lot!


Shauna Kelly

unread,
Sep 8, 2007, 8:37:21 AM9/8/07
to
Hi Fredrik

I'm glad it worked. Thanks for letting us know.

Shauna

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Fredrik" <feni...@gmail.com> wrote in message
news:1189237820.0...@o80g2000hse.googlegroups.com...

Raul Garcia

unread,
Jul 15, 2011, 8:32:14 AM7/15/11
to
Thank you very much, Shauna. I had been looking for a script like this. I do have an additional question, though.
How could I keep the reference numbers (or letters) instead of deleting them, and enclose the formatted footnotes, say, in angle brackets or some other symbol, to make them stand out in the body of the text?

Thanks so much!

> On Friday, September 07, 2007 9:22 AM Fredrik E. Nilsen wrote:

> Hello,
>
> I have a large document with several hundred footnotes. I'm looking
> for a code to replace the footnote reference with the actual footnote
> text. Any ideas on where to start?
>
> --
> Fredrik E. Nilsen


>> On Friday, September 07, 2007 9:54 AM Shauna Kelly wrote:

>> Hi Fredrik
>>
>> The following should get you started:
>>
>> Sub ReplaceFootnotesWithTheirText()
>>
>> Dim nCounter As Long
>> Dim fn As Word.Footnote
>> Dim rngFN As Word.Range
>>
>> For nCounter = ActiveDocument.Footnotes.Count To 1 Step -1
>> 'Get a reference to our footnote
>> Set fn = ActiveDocument.Footnotes(nCounter)
>>
>> 'Work out where to copy the text
>> Set rngFN = fn.Reference
>> rngFN.Collapse wdCollapseEnd
>>
>> 'Copy the text of the footnote into the body of the document
>> rngFN.FormattedText = fn.Range.FormattedText
>>
>> 'Delete the footnote
>> fn.Delete
>>
>> Next nCounter
>>
>> End Sub
>>
>>
>> Hope this helps.
>>
>> Shauna Kelly. Microsoft MVP.
>> http://www.shaunakelly.com/word
>>
>>
>> "Fredrik E. Nilsen" <fenilse...@chello.no> wrote in message
>> news:7tj2e3lfjk98tkm14...@4ax.com...


>>> On Saturday, September 08, 2007 3:50 AM Fredrik wrote:

>>> Not only did it get me started, it worked like a charm right out of
>>> the box. Thanks a lot!


>>>> On Saturday, September 08, 2007 8:37 AM Shauna Kelly wrote:

>>>> Hi Fredrik
>>>>
>>>> I am glad it worked. Thanks for letting us know.
>>>>
>>>> Shauna
>>>>

0 new messages