View Single Post
 
Old 09-23-2023, 09:19 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

I didn't check this on footnotes, but it's much faster:

For Each myRng In ActiveDocument.StoryRanges
Do
With myRng
Do
With .Find
.MatchWildcards = True
.text = "[,;.:?]" & "[«‹›»" & Chr(39) & Chr(34) & Chr(146) & Chr(148) & "]"
.Replacement.text = ""
.Wrap = wdFindStop
.Execute
End With
If .Find.found Then
myRng.InsertBefore myRng.Characters.Last
myRng.Characters.Last.Delete
Else: Exit Do
End If
myRng.Collapse 0
Loop
End With
Set myRng = myRng.NextStoryRange
Loop Until myRng Is Nothing
Next myRng
Reply With Quote