Skip to content

Latest commit

 

History

History
51 lines (28 loc) · 1.31 KB

Word.endnotes.md

File metadata and controls

51 lines (28 loc) · 1.31 KB
title ms.assetid ms.date ms.localizationpriority
Endnotes object (Word)
32676579-dd41-e83d-a305-fcc2b7cb4f64
06/08/2017
medium

Endnotes object (Word)

A collection of Endnote objects that represents all the endnotes in a selection, range, or document.

Remarks

Use the Endnotes property to return the Endnotes collection. The following example sets the location of endnotes in the active document.

ActiveDocument.Endnotes.Location = wdEndOfSection

Use the Add method to add an endnote to the Endnotes collection. The following example adds an endnote immediately after the selection.

Selection.Collapse Direction:=wdCollapseEnd 
ActiveDocument.Endnotes.Add Range:=Selection.Range , _ 
 Text:="The Willow Tree, (Lone Creek Press, 1996)."

Use Endnotes (Index), where Index is the index number, to return a single Endnote object. The index number represents the position of the endnote in a selection, range, or document. The following example applies red formatting to the first endnote in the selection.

If Selection.Endnotes.Count >= 1 Then 
 Selection.Endnotes(1).Reference.Font.ColorIndex = wdRed 
End If

See also

Word Object Model Reference

[!includeSupport and feedback]