Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 08-31-2020, 09:25 PM
Guessed's Avatar
Guessed Guessed is offline Modify macro to move only Blue font footnotes into the Text Windows 10 Modify macro to move only Blue font footnotes into the Text Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify macro to move only Blue font footnotes into the Text Word macro for selecting text and putting it in footnotes mdhg Word VBA 20 03-06-2024 08:07 AM
Modify macro to move only Blue font footnotes into the Text VBA - Word how to globally change the font and font size in footnotes thomasoj Word VBA 3 01-15-2020 06:26 AM
Modify macro to move only Blue font footnotes into the Text Modify macro to only add bullets to highlighted text if it exists. 14spar15 Word VBA 2 10-30-2018 08:27 PM
Modify macro to move only Blue font footnotes into the Text sum numbers whose font is blue OracleDBA Excel 2 06-29-2018 10:53 AM
All my footnotes turned to blue underlined text. bww Word 0 07-11-2013 08:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft