Add Method (Endnotes and Footnotes Collections)

Applies To

Endnotes collection object, Footnotes collection object.

Description

Adds an endnote or footnote to the specified range.

Syntax

expression.Add(Range, Reference, Text)

expression Required. An expression that returns an Endnotes or Footnotes object.

Range Required Range. The range marked for the endnote or footnote. This can be a collapsed range.

Reference Optional Variant. The text for the custom reference mark. If this argument is omitted, Word inserts an automatically numbered reference mark.

Text Optional Variant. The text of the endnote or footnote.

Remarks

To specify a symbol for the Reference argument, use the syntax {FontName CharNum}. FontName is the name of the font that contains the symbol. Names of decorative fonts appear in the Font box in the Symbol dialog box (Insert menu). CharNum is the sum of 31 and the number corresponding to the position of the symbol you want to insert, counting from left to right in the table of symbols. For example, to specify an omega symbol (w) at position 56 in the table of symbols in the Symbol font, the argument would be "{Symbol 87}."

See Also

Endnotes property, Footnotes property.

Example

This example adds an automatically numbered footnote at the end of the selection.

ActiveDocument.Footnotes.Add Range:= Selection.Range , _
    Text:= "The Willow Tree, (Lone Creek Press, 1996)."
This example adds an endnote to the third paragraph in the active document

Set myRange = ActiveDocument.Paragraphs(3).Range
ActiveDocument.Endnotes.Add Range:=myRange, _
    Text:= "Ibid., 314."
This example adds a footnote that uses a custom symbol (á) for the reference mark.

ActiveDocument.Footnotes.Add Range:= Selection.Range , _
    Text:= "More information in the full report.", _
    Reference:= "{MS LineDraw 225}"