Class Footnote (Word VBA)

The class Footnote represents a footnote positioned at the bottom of the page or beneath text. The Footnote object is a member of the Footnotes collection. The Footnotes collection represents the footnotes in a selection, range, or document.

The main procedures of class Footnote are Delete and Footnotes.Add

Set

To use a Footnote class variable it first needs to be instantiated, for example

Dim ftn as Footnote
Set ftn = ActiveDocument.Range.Footnotes(Index:=1)

The following procedures can be used to set variables of type Footnote: Footnotes.Add, Footnotes.Item, Document.Footnotes, Range.Footnotes and Selection.Footnotes

For Each

Here is an example of processing the Footnote items in a collection.

Dim ftn As Footnote
For Each ftn In ActiveDocument.Range.Footnotes
	
Next ftn

Methods

These are the main methods of the Footnote class

Delete - Deletes the specified footnote.

ActiveDocument.Range.Footnotes(1).Delete

Footnotes.Add - Returns a Footnote object that represents a footnote added to a range.

Dim ftn As Footnote
Set ftn = ActiveDocument.Range.Footnotes.Add(Range:=)

Properties

Index returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = ActiveDocument.Range.Footnotes(1).Index

Parent returns an object that represents the parent object of the specified Footnote object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.Footnotes(1).Parent

Range returns a Range object that represents the portion of a document that's contained within the footnote.

Dim rngRange As Range
Set rngRange = ActiveDocument.Range.Footnotes(1).Range

Reference returns a Range object that represents a footnote reference mark.

Dim rngReference As Range
Set rngReference = ActiveDocument.Range.Footnotes(1).Reference

Footnotes.ContinuationNotice returns a Range object that represents the footnote continuation notice.

Dim rngContinuationNotice As Range
Set rngContinuationNotice = ActiveDocument.Range.Footnotes.ContinuationNotice

Footnotes.ContinuationSeparator returns a Range object that represents the footnote continuation separator.

Dim rngContinuationSeparator As Range
Set rngContinuationSeparator = ActiveDocument.Range.Footnotes.ContinuationSeparator

Footnotes.Count returns a Long that represents the number of footnotes in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.Range.Footnotes.Count

Footnotes.Location returns or sets the position of all footnotes.

ActiveDocument.Range.Footnotes.Location = wdBeneathText

Footnotes.NumberingRule returns or sets the way footnotes or endnotes are numbered after page breaks or section breaks.

ActiveDocument.Range.Footnotes.NumberingRule = wdRestartContinuous

Footnotes.NumberStyle returns or sets the number style for the footnotes.

ActiveDocument.Range.Footnotes.NumberStyle = wdNoteNumberStyleArabic

Footnotes.Parent returns an object that represents the parent object of the specified Footnotes object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.Footnotes.Parent

Footnotes.Separator returns a Range object that represents the footnote separator.

Dim rngSeparator As Range
Set rngSeparator = ActiveDocument.Range.Footnotes.Separator

Footnotes.StartingNumber returns or sets the starting note number, line number, or page number.

ActiveDocument.Range.Footnotes.StartingNumber =