Endnotes 集合对象

         
多种对象
Endnotes (Endnote)
Range

Endnote 对象所组成的集合。该集合中的对象代表了选定内容、区域或文档中的所有尾注。

使用 Endnotes 集合

Endnotes 属性可返回 Endnotes 集合。下列示例设置尾注在活动文档中的位置。

ActiveDocument.Endnotes.Location = wdEndOfSection

Add 方法可在 Endnotes 集合中添加尾注。下列示例紧接着选定内容添加一个尾注。

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

Endnotes(index) 可返回单个 Endnote 对象,其中 index 是索引序号。索引序号代表该尾注在选定内容、区域或文档中的位置。下列示例将选定内容中的第一个尾注设置成红色。

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