PageNumbers.IncludeChapterNumber 属性 (Word)
为 页码或题注标签包含章节号时。 读/写 Boolean。
语法
expression。 IncludeChapterNumber
表达 一个代表“PageNumbers”对象的变量。
示例
本例为活动文档中第一节的页脚添加页码。 页码包含章节号。
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"
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈