View Single Post
Old 11-05-2017, 12:58 PM
ballpoint ballpoint is offline Windows 10 Office 2016
Advanced Beginner
Join Date: Sep 2017
Posts: 42
ballpoint is on a distinguished road

You are absolutely correct, sorry for the omission.

Here is the code:

Sub foot2inline()
Dim oFeets As Footnotes
Dim oFoot As Footnote
Dim oRange As Range
Dim szFootNoteText As String
Dim index As Long

' Grabs the collection of FootNotes
Set oFeets = ActiveDocument.Footnotes

' Iterates through each footnote
For Each oFoot In oFeets
    index = index + 1
    szFootNoteText = oFoot.Range.Text
    'Start search from beginning of document
    Set oRange = ActiveDocument.Range
    With oRange.Find
        .Text = "^f" ' Looks for all footnotes
        .Forward = True
        .Wrap = wdFindStop
    End With
    ' Delete the footnote
    'Insert the footnote text
    oRange.Text = " [Note " & index & ": " & szFootNoteText & "] "

    'CHANGE COLOR HERE. Color code is below.
    'oRange.Font.Color = 6299648

    'Disables undo to save memory on very large documents.
End Sub
Reply With Quote