![]() |
|
|
|
#1
|
|||
|
|||
|
The macro also removes brackets and contents that are not superscripted. What have I done wrong?
Code:
Sub RemoveFootnotes()
Application.ScreenUpdating = False
ActiveDocument.Fields.Unlink ' I think this removes hyperlinks
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Superscript = True
.Execute FindText:="[\(\[]*[\)\]]", ReplaceWith:="", MatchWildcards:=True, Format:=False, Forward:=True, Wrap:=wdFindContinue, Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
Last edited by macropod; 06-10-2025 at 12:09 AM. Reason: Added code tags for code formatting |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Word Macro for removing parentheses around footnote numbers
|
LLLCa947 | Word VBA | 6 | 11-21-2024 01:44 AM |
Convert superscript numbers to auto-footnote markers
|
ra_beale | Word VBA | 4 | 09-05-2022 07:09 AM |
How to remove extra space between footnote separator and 1st footnote. No para breaks present.
|
Swarup | Word | 2 | 07-09-2022 07:42 PM |
Macro to change font size of Footnote Reference in Footnote Text
|
TheBigBoss | Word VBA | 5 | 06-10-2022 06:14 AM |
Footnote reference numbers precede by superscript '(' and follow w/ superscript ')'
|
Swarup | Word | 4 | 07-18-2019 05:51 PM |