CaptionLabels 集合对象

         
Application
CaptionLabels (CaptionLabel)

CaptionLabel 对象所组成的集合,该集合中的对象代表有效的题注标签。CaptionLabels 集合中的元素都列于“插入”菜单中“题注”对话框的“标签”框内。

使用 CaptionLabels 集合

CaptionLabels 属性可返回 CaptionLabels 集合。在默认情况下,CaptionLabels 集合包含三种题注标签:图表、表格和公式。

Add 方法可添加自定义的题注标签。下列示例添加一个名为“Photo”的题注标签。

CaptionLabels.Add Name:="Photo"

CaptionLabels(index) 可返回单个 CaptionLabel 对象,其中 index 是指题注标签的名称或索引序号。下列示例为题注标签“Figure”设置编号样式。

CaptionLabels("Figure").NumberStyle = _
    wdCaptionNumberStyleLowercaseLetter

索引序号代表题注标签在 CaptionLabels 集合中的位置。下列示例显示第一个题注标签。

MsgBox CaptionLabels(1).Name