View Single Post
 
Old 08-12-2025, 02:30 AM
RobiNew RobiNew is offline Windows 11 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Default

Hi macropod! I didn't do anything stupid on activating your macro. The only stupid thing I did was to think that an expert could easily modify my bit of code. But perhaps the idea was not so stupid after all, because Vivka has now done what I expected from an expert. Here below is my simple macro with Vivka's modifications. It works perfectly in both areas. All the best!


Sub AddSuperscriptLetterToFootnotes()
Dim ftNote As Footnote
Dim supLetter As String
Dim i As Integer

supLetter = "a"
'Loop through all footnotes
For i = 1 To ActiveDocument.Footnotes.Count
Set ftNote = ActiveDocument.Footnotes(i)

'Main Document Reference
With ftNote.Reference
.InsertAfter supLetter
.Characters(.Characters.Count).Font.Superscript = True
End With

'Footnote Text Area
With ftNote.Range
.Characters.First.Previous = supLetter & Chr(32)
.Characters.First.Font.Superscript = True
End With
Next i
MsgBox "Superscript letters added to footnote references.", vbInformation
Reply With Quote