代表出版物或文件的區段。
註解
使用 Sections.Item (索引) ,其中 index 是索引號碼,以傳回單一 Section 物件。
使用 Sections.Add (StartPageIndex) ,其中 StartPageIndex 是頁面的索引號碼,以傳回新增至文件的新區段。 如果頁面已包含章節標題,則會傳回「權限遭拒」錯誤。
範例
下列範例會將 Section 物件設為使用中文件 Sections 集合內的第一個區段。
Dim objSection As Section
Set objSection = ActiveDocument.Sections.Item(1)
下列範例會將 Section 物件新增至使用中文件的第二頁。
Dim objSection As Section
Set objSection = ActiveDocument.Sections.Add(StartPageIndex:=2)
方法
屬性
- Application
- ContinueNumbersFromPreviousSection
- PageNumberFormat
- PageNumberStart
- Parent
- ShowHeaderFooterOnFirstPage
- StartPageIndex
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。