This class is used to represent a section of the document. Many documents will only contain one section. More complex documents will divide the document into multiple sections. A section can be roughly correlated to a chapter in a book. Each section can have different formatting settings, including:

 public sealed class Section : Element
Public NotInheritable Class Section
		Inherits Element

To create a new section, use Element.CreateSectionBefore().

To get an existing section, use Document.Sections.

The following sample shows you how to get the add a new section to a document and how to get the first section of a document.


          //--- Add a new section to a document
          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
          Section sect = doc.CreateSectionAfter();

          //--- Get the first section of a document
          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
          Section sec1 = doc.Sections[0];
        

          '--- Add a new section to a document
          Dim app As New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
          Dim sect As Section = doc.CreateSectionAfter()

          '--- Get the first section of a document
          Dim app As New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
          Dim sect As Section = doc.Sections(0)
        

Name

Description

BorderAlwaysInFront

BorderAppliedTo

BorderOffsetsFromPage

BottomMargin

Break

FirstLineNum

FirstPageNum

FooterY

GutterWidth

HasTitlePage

HeaderY

LeftMargin

LineNumberingType

LineNumberX

LineNumModulus

LinesBetween

NumColumns

PageHeight

PageNumberFormat

PageOrientation

PageSize

PageWidth

RestartPageNum

RightMargin

TopMargin

Unlocked

Name

Description

GetBorder(Border.Location)

GetFooter(Section.HeaderFooterType)

GetHeader(Section.HeaderFooterType)

Name

Description

BorderArea

BreakType

HeaderFooterType

LineNumbering

NumberFormat

Orientation

PagePaperSize