Modify recorded macro to run until end of document
Editing a Word document that contains multiple footnotes that are not numbered seriatim and I want to change them so they are. Here is a macro I have recorded that enables me to replace the existing footnotes one at a time. How do I modify this to replace all the footnotes in the existing document?
Selection.Find.ClearFormatting
With Selection.Find.Font
.Superscript = True
.Subscript = False
End With
With Selection.Find
.Text = ""
.Replacement.Text = "~"
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
.LayoutColumns = 0
End With
.Footnotes.Add Range:=Selection.Range, Reference:=""
End With
End Sub
|