共用方式為


發行者) (Section 物件

表示發行集或檔的區段。

註解

使用 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)

方法

屬性

另請參閱

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應