IncludeChapterNumber 属性

       

如果该属性值为 True,则页码或题注标签中包含章节号。Boolean 类型,可读写。

expression.IncludeChapterNumber

expression   必需。该表达式返回“应用于”列表中的一个对象。

示例

本例为活动文档中第一节的页脚添加页码。页码包含章节号。

With ActiveDocument.Sections(1).Footers _
        (wdHeaderFooterPrimary).PageNumbers
    .Add
    .IncludeChapterNumber = True
    .HeadingLevelForChapter = 1
End With

本示例将“标题 2”样式的章节号添至图表题注,设置题注编号样式,然后插入新的图表题注。该文档应带有已编号的“标题 2”样式。

With CaptionLabels(wdCaptionFigure)
    .IncludeChapterNumber = True
    .ChapterStyleLevel = 2
    .NumberStyle = wdCaptionNumberStyleUppercaseLetter
End With
Selection.InsertCaption Label:="Figure", Title:=": History"