View Single Post
 
Old 10-17-2024, 12:26 AM
Shelley Lou Shelley Lou is offline Windows 10 Office 2016
Expert
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Format Footnote Text Number

Hi Andrew, thank you so much for replying. I couldn't get your code to work but after refining various find and replaced, the code below seems to work. Thank you so much for your time though, it was the wdFootnotesStory I didn't think of.

Code:
Sub FormatFootnoteNumber()
Application.ScreenUpdating = False
With ActiveDocument.StoryRanges(wdFootnotesStory).Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .text = "^2"
    .Replacement.text = "^&"
    .Replacement.Font.Superscript = False
    .Replacement.Font.Size = 8
    .Replacement.Font.Bold = True
    .Forward = True
    .Format = True
    .Wrap = wdFindContinue
    .Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
Reply With Quote