共用方式為


SectionProperties Class

Section Properties.When the object is serialized out as xml, its qualified name is w:sectPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.SectionProperties

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(PageSize))> _
<ChildElementInfoAttribute(GetType(TextDirection))> _
<ChildElementInfoAttribute(GetType(HeaderReference))> _
<ChildElementInfoAttribute(GetType(FooterReference))> _
<ChildElementInfoAttribute(GetType(FootnoteProperties))> _
<ChildElementInfoAttribute(GetType(EndnoteProperties))> _
<ChildElementInfoAttribute(GetType(SectionType))> _
<ChildElementInfoAttribute(GetType(PageMargin))> _
<ChildElementInfoAttribute(GetType(PaperSource))> _
<ChildElementInfoAttribute(GetType(PageBorders))> _
<ChildElementInfoAttribute(GetType(LineNumberType))> _
<ChildElementInfoAttribute(GetType(PageNumberType))> _
<ChildElementInfoAttribute(GetType(Columns))> _
<ChildElementInfoAttribute(GetType(FormProtection))> _
<ChildElementInfoAttribute(GetType(VerticalTextAlignmentOnPage))> _
<ChildElementInfoAttribute(GetType(NoEndnote))> _
<ChildElementInfoAttribute(GetType(TitlePage))> _
<ChildElementInfoAttribute(GetType(BiDi))> _
<ChildElementInfoAttribute(GetType(GutterOnRight))> _
<ChildElementInfoAttribute(GetType(DocGrid))> _
<ChildElementInfoAttribute(GetType(PrinterSettingsReference))> _
<ChildElementInfoAttribute(GetType(SectionPropertiesChange))> _
Public Class SectionProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As SectionProperties
[ChildElementInfoAttribute(typeof(PageSize))]
[ChildElementInfoAttribute(typeof(TextDirection))]
[ChildElementInfoAttribute(typeof(HeaderReference))]
[ChildElementInfoAttribute(typeof(FooterReference))]
[ChildElementInfoAttribute(typeof(FootnoteProperties))]
[ChildElementInfoAttribute(typeof(EndnoteProperties))]
[ChildElementInfoAttribute(typeof(SectionType))]
[ChildElementInfoAttribute(typeof(PageMargin))]
[ChildElementInfoAttribute(typeof(PaperSource))]
[ChildElementInfoAttribute(typeof(PageBorders))]
[ChildElementInfoAttribute(typeof(LineNumberType))]
[ChildElementInfoAttribute(typeof(PageNumberType))]
[ChildElementInfoAttribute(typeof(Columns))]
[ChildElementInfoAttribute(typeof(FormProtection))]
[ChildElementInfoAttribute(typeof(VerticalTextAlignmentOnPage))]
[ChildElementInfoAttribute(typeof(NoEndnote))]
[ChildElementInfoAttribute(typeof(TitlePage))]
[ChildElementInfoAttribute(typeof(BiDi))]
[ChildElementInfoAttribute(typeof(GutterOnRight))]
[ChildElementInfoAttribute(typeof(DocGrid))]
[ChildElementInfoAttribute(typeof(PrinterSettingsReference))]
[ChildElementInfoAttribute(typeof(SectionPropertiesChange))]
public class SectionProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • HeaderReference <w:headerReference>

  • FooterReference <w:footerReference>

  • FootnoteProperties <w:footnotePr>

  • EndnoteProperties <w:endnotePr>

  • SectionType <w:type>

  • PageSize <w:pgSz>

  • PageMargin <w:pgMar>

  • PaperSource <w:paperSrc>

  • PageBorders <w:pgBorders>

  • LineNumberType <w:lnNumType>

  • PageNumberType <w:pgNumType>

  • Columns <w:cols>

  • FormProtection <w:formProt>

  • VerticalTextAlignmentOnPage <w:vAlign>

  • NoEndnote <w:noEndnote>

  • TitlePage <w:titlePg>

  • TextDirection <w:textDirection>

  • BiDi <w:bidi>

  • GutterOnRight <w:rtlGutter>

  • DocGrid <w:docGrid>

  • PrinterSettingsReference <w:printerSettings>

  • SectionPropertiesChange <w:sectPrChange>

[ISO/IEC 29500-1 1st Edition]

17.6.17 sectPr (Document Final Section Properties)

This element defines the section properties for the final section of the document. [Note: For any other section the properties are stored as a child element of the paragraph element corresponding to the last paragraph in the given section. end note]

[Example: Consider a document with multiple sections. For all sections except the final section, the sectPr element is stored as a child element of the last paragraph in the section. For the final section, this information is stored as the last child element of the body element, as follows:

<w:body>
<w:p>
…
</w:p>
…
<w:sectPr>
(final section's properties)
</w:sectPr>
</w:body>

end example]

Parent Elements

body (§17.2.2); docPartBody (§17.12.6)

Child Elements

Subclause

bidi (Right to Left Section Layout)

§17.6.1

cols (Column Definitions)

§17.6.4

docGrid (Document Grid)

§17.6.5

endnotePr (Section-Wide Endnote Properties)

§17.11.5

footerReference (Footer Reference)

§17.10.2

footnotePr (Section-Wide Footnote Properties)

§17.11.11

formProt (Only Allow Editing of Form Fields)

§17.6.6

headerReference (Header Reference)

§17.10.5

lnNumType (Line Numbering Settings)

§17.6.8

noEndnote (Suppress Endnotes In Document)

§17.11.16

paperSrc (Paper Source Information)

§17.6.9

pgBorders (Page Borders)

§17.6.10

pgMar (Page Margins)

§17.6.11

pgNumType (Page Numbering Settings)

§17.6.12

pgSz (Page Size)

§17.6.13

printerSettings (Reference to Printer Settings Data)

§17.6.14

rtlGutter (Gutter on Right Side of Page)

§17.6.16

sectPrChange (Revision Information for Section Properties)

§17.13.5.32

textDirection (Text Flow Direction)

§17.6.20

titlePg (Different First Page Headers and Footers)

§17.10.6

type (Section Type)

§17.6.22

vAlign (Vertical Text Alignment on Page)

§17.6.23

Attributes

Description

rsidDel (Section Deletion Revision ID)

Specifies a unique identifier used to track the editing session when the section mark for this section was deleted from the document.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidR (Section Addition Revision ID)

Specifies a unique identifier used to track the editing session when the section mark for this section was added to the document.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidRPr (Physical Section Mark Character Revision ID)

Specifies a unique identifier used to track the editing session when the physical character representing this section mark was last formatted.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidSect (Section Properties Revision ID)

Specifies a unique identifier used to track the editing session when the physical character representing this section mark was last formatted.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

[Note: The W3C XML Schema definition of this element’s content model (CT_SectPr) is located in §A.1. end note]

[ISO/IEC 29500-1 1st Edition]

17.6.18 sectPr (Section Properties)

This element defines the section properties for the a section of the document. [Note: For the last section in the document, the section properties are stored as a child element of the body element. end note]

[Example: Consider a document with multiple sections. For all sections except the final section, the sectPr element is stored as a child element of the last paragraph in the section, as follows:

<w:body>
<w:p>
    <w:pPr>
      <w:sectPr>
(final section's properties)
</w:sectPr>
    </w:pPr>
  …
</w:p>
…
<w:sectPr>
(final section's properties)
</w:sectPr>
</w:body>

end example]

Parent Elements

pPr (§17.3.1.26)

Child Elements

Subclause

bidi (Right to Left Section Layout)

§17.6.1

cols (Column Definitions)

§17.6.4

docGrid (Document Grid)

§17.6.5

endnotePr (Section-Wide Endnote Properties)

§17.11.5

footerReference (Footer Reference)

§17.10.2

footnotePr (Section-Wide Footnote Properties)

§17.11.11

formProt (Only Allow Editing of Form Fields)

§17.6.6

headerReference (Header Reference)

§17.10.5

lnNumType (Line Numbering Settings)

§17.6.8

noEndnote (Suppress Endnotes In Document)

§17.11.16

paperSrc (Paper Source Information)

§17.6.9

pgBorders (Page Borders)

§17.6.10

pgMar (Page Margins)

§17.6.11

pgNumType (Page Numbering Settings)

§17.6.12

pgSz (Page Size)

§17.6.13

printerSettings (Reference to Printer Settings Data)

§17.6.14

rtlGutter (Gutter on Right Side of Page)

§17.6.16

sectPrChange (Revision Information for Section Properties)

§17.13.5.32

textDirection (Text Flow Direction)

§17.6.20

titlePg (Different First Page Headers and Footers)

§17.10.6

type (Section Type)

§17.6.22

vAlign (Vertical Text Alignment on Page)

§17.6.23

Attributes

Description

rsidDel (Section Deletion Revision ID)

Specifies a unique identifier used to track the editing session when the section mark for this section was deleted from the document.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidR (Section Addition Revision ID)

Specifies a unique identifier used to track the editing session when the section mark for this section was added to the document.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidRPr (Physical Section Mark Character Revision ID)

Specifies a unique identifier used to track the editing session when the physical character representing this section mark was last formatted.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

rsidSect (Section Properties Revision ID)

Specifies a unique identifier used to track the editing session when the physical character representing this section mark was last formatted.

All rsid* attributes throughout this document of an equal value, if present, shall indicate that those regions were modified during the same editing session.

A producer can choose to increment the revision save ID value to indicate subsequent editing sessions (editing between save actions) to indicate the order of the saves performed.

The possible values for this attribute are defined by the ST_LongHexNumber simple type (§17.18.50).

[Note: The W3C XML Schema definition of this element’s content model (CT_SectPr) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SectionProperties Members

DocumentFormat.OpenXml.Wordprocessing Namespace