Message-ID: <29125111.9793.1711702934826.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9792_405937090.1711702934826" ------=_Part_9792_405937090.1711702934826 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This class is used to represent a section of the document. Many document= s will only contain one section. More complex documents will divide the doc= ument into multiple sections. A section can be roughly correlated to a chap= ter in a book. Each section can have different formatting settings, includi= ng:
=20public sealed class Section : Element=20
Public NotInheritable Class Section =09=09Inherits Element=20
To create a new section, use Element.CreateSectionBefore().
=20To get an existing section, use Document.Sections.
=20The following sample shows you how to get the add a new section to a doc= ument and how to get the first section of a document.
=20//--- Add a new section to a document WordApplication app =3D new WordApplication(); Document doc =3D app.Open(@"C:\sample.doc"); Section sect =3D doc.CreateSectionAfter(); //--- Get the first section of a document WordApplication app =3D new WordApplication(); Document doc =3D app.Open(@"C:\sample.doc"); Section sec1 =3D doc.Sections[0];=20
'--- Add a new section to a document Dim app As New WordApplication() Dim doc As Document =3D app.Open("C:\sample.doc") Dim sect As Section =3D doc.CreateSectionAfter() '--- Get the first section of a document Dim app As New WordApplication() Dim doc As Document =3D app.Open("C:\sample.doc") Dim sect As Section =3D doc.Sections(0)=20
Name | =20
Description | =20
---|---|
=20 | Sets or returns a boolean that repr=
esents whether or not page borders for this section will always display in =
front of any objects it may overlap. | =20
=20 | Sets or returns a BorderArea object that represents where the page border w= ill be applied to. | =20
=20 | Sets or returns a boolean that repr=
esents whether or not the padding for this section's page border will be me=
asured from the edge of the page or from the text it surrounds. | =20
=20 | Sets or returns an int that represe=
nts the vertical distance of the bottom margin from the bottom edge of the =
page for this section. One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns a Section.BreakType object that represents the type of break= (before) this section. There are 5 types of breaks: Continuous, Column, Pa= ge, EvenPage, and OddPage. | =20
=20 | Sets or returns an int that represe=
nts the number that the line numbering starts at for this section. | =20
=20 | Sets or returns an int that represe=
nts the number that the page numbering starts at for this section. | =20
=20 | Sets or returns an int that represe=
nts the y coordinate of the footer measured from the top edge of the page. =
One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns an int that represe=
nts the gutter width for this section. The gutter adds space to the margin.=
Gutters are used when a document needs additional space to allow for bindi=
ng. One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns a boolean that repr=
esents whether or not this section has a title page. This can affect page n=
umbering and the appearance of headers and footers. | =20
=20 | Sets or returns an int that represe=
nts the y coordinate of the header measured from the top edge of the page. =
One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns an int that represe=
nts the horizontal distance of the left margin from the left edge of the pa=
ge for this section. One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns a Section.LineNumbering object that represents the line = numbering restart policy for this section. There are 3 options: | =20
=20 | Sets or returns an int that represe=
nts the x position of line numbers in twips. One twip =3D (1/20 pt) or ( 1/=
1440 in) | =20
=20 | Sets or returns an int that represe=
nts the line numbering modulus. This setting is used to set whether line nu=
mbers display on every line, every 2nd line, etc. Setting this to 0 (zero) =
will display no line numbers. Setting this to 1 will display a number by ev=
ery line. Setting this to 2 will display a number by every 2nd line, etc.=
td>=20
|
=20 | Sets or returns a boolean that repr=
esents whether or not Word will draw vertical lines between columns. | =
=20
=20 | Sets or returns an int that represe=
nts the number of columns in this section. | =20
=20 | Sets or returns an int that represe=
nts the page height for this section in twips. One twip =3D (1/20 pt) or (1=
/1440 in) | =20
=20 | Sets or returns a Section.NumberFormat object that represents the page nu= mber format for this section. There are 5 type of page number formats: | = =20
=20 | Sets or returns a Section.Orientation object that represents the page orie= ntation for this section. Possible values: Portrait, Landscape, Mixed | = =20
=20 | Sets or returns the size of printed pages. | = =20
=20 | Sets or returns an int that represe=
nts the page width for this section in twips. One twip =3D (1/20 pt) or (1/=
1440 in) | =20
=20 | Sets or returns a boolean that repr=
esents whether or not page numbering will restart at the beginning of this =
section. | =20
=20 | Sets or returns an int that represe=
nts the horizontal distance of the right margin from the right edge of the =
page for this section. One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns an int that represe=
nts the vertical distance of the top margin from the top edge of the page f=
or this section. One twip =3D (1/20 pt) or (1/1440 in) | =20
=20 | Sets or returns a boolean that repr=
esents whether or not this section is unlocked. | =20
Name | =20
Description | =20
---|---|
=20 | Returns a Border= object that represents the border of this section at the specified loc= ation. You can use the returned object to manipulate the borders for this s= ection. Valid locations: Top, Left, Bottom, Right | =20
=20 | Returns an Elem= ent object that represents the footer of the specified type for this se= ction. The footer is returned as a editable element. There are 4 types of f= ooters: | =20
=20 | Returns an Elem= ent object that represents the header of the specified type for this se= ction. The header is returned as a editable element. There are 4 types of h= eaders: | =20
Name | =20
Description | =20
---|---|
=20 | Areas that a border can be applied to for a sect= ion. | =20
=20 | Types of breaks that can preceed a section. | = =20
=20 | Types of headers and footers. | =20
=20 | Line numbering settings for a section. | =20
=20 | Formats for page numbers in a section. | =20
=20 | Page orientations for a section. | =20
=20 | Page paper sizes that can be applied to a sectio= n. All native sizes are supported, and additional sizes are provided | = =20