View Single Post
 
Old 08-31-2020, 09:25 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

OK, create a paragraph style called "Footnote Text Red" and apply it to the Footnotes that need to go inline when you run the macro.
Code:
Sub MoveFootnotesIntoText()
  Dim RngSrc As Range, RngTgt As Range, f As Long
  For f = ActiveDocument.Footnotes.Count To 1 Step -1
    With ActiveDocument.Footnotes(f)
      Set RngSrc = .Range
      Set RngTgt = .Reference
      RngSrc.End = RngSrc.End - 1
      If RngSrc.Paragraphs(1).Style = "Footnote Text Red" Then
        RngTgt.Collapse wdCollapseStart
        RngTgt.FormattedText = RngSrc.FormattedText
        .Delete
      End If
    End With
  Next
  Set RngSrc = Nothing: Set RngTgt = Nothing
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote