Moving Word FootNotes to Excel

ReportReportReport

New Member
Joined
Feb 24, 2017
Messages
1
I use a module (found on this site) to move footnotes in a word document to excel. It pulls Footnote number, page number and text and it a huge time saver. i often use ";" to denote a second source in a footnote(ex Source 1; Source 2; source 3) and i was hoping someone could help add some code that creates a second row or third row in excel for the extra sources.


Sub ExtractFootnotes()Dim xlapp As Object
Dim xlbook As Object
Dim xlsheet As Object
Dim i As Long, lognum As Long
Dim fnote As Footnote
On Error Resume Next
Set xlapp = GetObject(, "Excel.Application")
If Err Then
bstartApp = True
Set xlapp = CreateObject("Excel.Application")
End If
On Error GoTo 0
Set xlbook = xlapp.Workbooks.Add
Set xlsheet = xlbook.Worksheets(1)
With xlsheet.Range("A1")
.Offset(0, 0).Value = "Foonote Ref"
.Offset(0, 1).Value = "Page"
.Offset(0, 2).Value = "Footnote Text"
i = 1
For Each fnote In ActiveDocument.Footnotes
.Offset(i, 0).Value = fnote.Index
.Offset(i, 1).Value = fnote.Range.Information(wdActiveEndPageNumber)
.Offset(i, 2).Value = fnote.Range.Text
i = i + 1
Next fnote
End With
xlapp.Visible = True
xlbook.Activate
Set xlapp = Nothing
Set xlbook = Nothing
Set xlsheet = Nothing
End Sub
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,226,739
Messages
6,192,739
Members
453,754
Latest member
milestogo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top