Delete footnotes in a Word document with VBA

There must be some easy way to delete all the footnotes in Word document.
The following code works if one knows that there are 44 footnotes are in a document, but there must be a better way.

Dim i as Integer
      Selection.GoTo What:=wdGoToFootnote, Which:=wdGoToNext, Count:=1, Name:=""
      Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
      Selection.Delete Unit:=wdCharacter, Count:=1
      i = i + 1
      If i = 44 Then End
Thanks for any help possible.
JohnRobinAllenRetired professor of FrenchAsked:
Who is Participating?
Robert SchuttSoftware EngineerCommented:
Try this:
    Dim i As Integer
    For i = Application.ActiveDocument.Footnotes.Count To 1 Step -1

Open in new window

JohnRobinAllenRetired professor of FrenchAuthor Commented:
The solution works beautifully. Many thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.