Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2019, 01:24 PM
NoCalScribe NoCalScribe is offline Adding footnote number as part of footnote text Windows 10 Adding footnote number as part of footnote text Office 2016
Novice
Adding footnote number as part of footnote text
 
Join Date: Jul 2019
Posts: 4
NoCalScribe is on a distinguished road
Default Adding footnote number as part of footnote text

I have a large document with many footnotes that will be undergoing some updates. The author's desire is to keep the original footnote reference number in front of the footnote text (also as text, not footnote reference style) so you can see what the original number was even after new footnotes are added that change the numbering.




I would like to insert the word Note with the number in curly brackets between the footnote reference number and the footnote text.
Example:
1 {Note 1} footnote 1 text
2 {Note 2} footnote 2 text

I have a macro that loops through the footnotes and adds additional text, but incorporating a variable number as part of that text is beyond me.


Any help is appreciated – thanks!
Reply With Quote
  #2  
Old 07-15-2019, 03:17 PM
Guessed's Avatar
Guessed Guessed is offline Adding footnote number as part of footnote text Windows 10 Adding footnote number as part of footnote text Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

Do you want the number to be static text or a seq field so that it always matches the footnote number?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-15-2019, 03:38 PM
gmaxey gmaxey is online now Adding footnote number as part of footnote text Windows 10 Adding footnote number as part of footnote text Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Perhaps something like this:

Code:
Option Explicit
Private m_oFN As Footnote
Sub ScratchMacro()
  For Each m_oFN In ActiveDocument.Footnotes
    m_oFN.Range.Text = "(Note - " & fcnGetFootnoteReferenceIndex & ") " & m_oFN.Range.Text
  Next
lbl_Exit:
  Exit Sub
End Sub

Function fcnGetFootnoteReferenceIndex() As String
  With m_oFN
    With .Reference.Characters.First
      .Collapse
      .InsertCrossReference wdRefTypeFootnote, wdFootnoteNumberFormatted, m_oFN.Index
      fcnGetFootnoteReferenceIndex = .Characters.First.Fields(1).Result
      .Characters.Last.Fields(1).Delete
    End With
  End With
lbl_Exit:
  Exit Function
End Function
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #4  
Old 07-15-2019, 07:20 PM
NoCalScribe NoCalScribe is offline Adding footnote number as part of footnote text Windows 10 Adding footnote number as part of footnote text Office 2016
Novice
Adding footnote number as part of footnote text
 
Join Date: Jul 2019
Posts: 4
NoCalScribe is on a distinguished road
Default

Thanks, Greg - that does the trick!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding footnote number as part of footnote text Space between footnote number and footnote text Sabya Word 6 07-29-2018 02:30 PM
Adding footnote number as part of footnote text No space between footnote number and footnote cgp1689 Word 6 10-13-2015 08:24 AM
Extracting certain text before footnote number Taisir Word VBA 6 11-26-2014 12:27 AM
Adding footnote number as part of footnote text VBA code to read number of footnote and enter in text rekent Word VBA 2 05-13-2014 06:53 AM
Footnote text is not aligned with the corresponding number Patrick1988 Word 0 08-28-2010 09:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:58 AM.


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