WordSectionScope
OfficeIMO.Word
Edits one WordSection: its fluent methods and keywords, each returning this scope.
Inheritance
- object
- WordSectionScope
Usage
Explore 29 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 28
- Method WordSectionScope.Bookmark
- Method WordSectionScope.Bookmarks
- Method WordSectionScope.Borders
- Method WordSectionScope.BreakType
- Method WordSectionScope.Chart
- Method WordSectionScope.Charts
- Method WordSectionScope.ColumnCount
- Method WordSectionScope.ColumnDefinitions
- Method WordSectionScope.ColumnsSpace
- Method WordSectionScope.Element
- Method WordSectionScope.Elements
- Method WordSectionScope.Field
- Method WordSectionScope.Fields
- Method WordSectionScope.Footer
- Method WordSectionScope.HasColumnSeparator
- Method WordSectionScope.Header
- Method WordSectionScope.HorizontalLine
- Method WordSectionScope.HyperLink
- Method WordSectionScope.Image
- Method WordSectionScope.PageSetup
- Method WordSectionScope.Paragraph
- Method WordSectionScope.Paragraphs
- Method WordSectionScope.RtlGutter
- Method WordSectionScope.Shape
- Method WordSectionScope.SmartArt
- Method WordSectionScope.Table
- Method WordSectionScope.TextBox
- Method WordSectionScope.Watermark
Accepted by parameters 1
- Method WordDocumentScope.Section
Methods
public WordSectionScope Bookmark(WordBookmark item) #Adds an item to WordSection.Bookmarks: Gets all bookmarks defined in the section.
Parameters
- item OfficeIMO.Word.WordBookmark
- The item.
public WordSectionScope Bookmarks(IEnumerable<WordBookmark> items) #Adds items to WordSection.Bookmarks: Gets all bookmarks defined in the section.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordBookmark>
- The items, in order.
public WordSectionScope Borders(WordBorder wordBorder) #Applies border settings to the section.
Parameters
- wordBorder OfficeIMO.Word.WordBorder
- Border preset to apply.
public WordSectionScope Borders(Action<WordBorders> configure) #Configures WordSection.Borders in place: Provides access to page border settings for this section.
Parameters
- configure System.Action<OfficeIMO.Word.WordBorders>
- Configures the value.
public WordSectionScope BreakType(WordSectionBreakType value) #Sets WordSection.BreakType: Gets or sets how this section starts relative to the preceding section. An omitted section type uses WordSectionBreakType.NextPage.
Parameters
- value OfficeIMO.Word.WordSectionBreakType
- The value.
public WordSectionScope Chart(WordChart item) #Adds an item to WordSection.Charts: Gets all charts contained in the section.
Parameters
- item OfficeIMO.Word.WordChart
- The item.
public WordSectionScope Charts(IEnumerable<WordChart> items) #Adds items to WordSection.Charts: Gets all charts contained in the section.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordChart>
- The items, in order.
public WordSectionScope ColumnCount(int? value) #Sets WordSection.ColumnCount: Gets or sets the number of columns in the section.
Parameters
- value int?
- The value.
public WordSectionScope ColumnDefinitions(IReadOnlyList<WordSectionColumn> value) #Sets WordSection.ColumnDefinitions: Gets or replaces explicit section column widths and individual gaps. Setting a non-empty list selects unequal-width columns and synchronizes ColumnCount. An empty list restores equal-width columns while retaining their count and default gap. An omitted individual gap is zero for unequal columns; ColumnsSpace applies to equal widths. DOCX preserves the omission; native DOC writes its effective zero explicitly. Native DOC saving supports up to 44 columns, widths from 718 through 32767 twips, and gaps from zero through 32767 twips.
Parameters
- value System.Collections.Generic.IReadOnlyList<OfficeIMO.Word.WordSectionColumn>
- The value.
public WordSectionScope ColumnsSpace(OfficeLength? value) #Sets WordSection.ColumnsSpace: Gets or sets the equal-width column gap as a physical length. Null omits the stored gap; layout uses its existing 36-point default. Storage rounds to whole signed 32-bit twips. Native DOC saving accepts only gaps from zero through 65535 twips and writes its default for an omitted gap when a column count is set. Individual unequal-column gaps are controlled by ColumnDefinitions.
Parameters
- value OfficeIMO.OfficeLength?
- The value.
public WordSectionScope Element(WordElement item) #Adds an item to WordSection.Elements: Provides a list of all elements within the section including paragraphs, tables, images, etc.
Parameters
- item OfficeIMO.Word.WordElement
- The item.
public WordSectionScope Element(Action<WordElement> configure) #Creates an item, configures it and adds it to WordSection.Elements: Provides a list of all elements within the section including paragraphs, tables, images, etc.
Parameters
- configure System.Action<OfficeIMO.Word.WordElement>
- Configures the new item before it is added.
public WordSectionScope Elements(IEnumerable<WordElement> items) #Adds items to WordSection.Elements: Provides a list of all elements within the section including paragraphs, tables, images, etc.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordElement>
- The items, in order.
public WordSectionScope Field(WordField item) #Adds an item to WordSection.Fields: Gets all fields within the section.
Parameters
- item OfficeIMO.Word.WordField
- The item.
public WordSectionScope Fields(IEnumerable<WordField> items) #Adds items to WordSection.Fields: Gets all fields within the section.
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordField>
- The items, in order.
public WordSectionScope HasColumnSeparator(bool value = true) #Sets WordSection.HasColumnSeparator: Gets or sets whether a separator line is shown between section columns.
Parameters
- value bool = true
- The value; true when omitted.
public WordSectionScope Header(Action<WordHeaderScope> configure) #Configures the section's default header, creating it when missing.
Parameters
- configure System.Action<OfficeIMO.Word.WordHeaderScope>
- Composes the header.
public WordSectionScope HorizontalLine(WordBorderStyle? lineType = null, OfficeColor? color = null, uint size = 12, uint space = 1, Action<WordParagraphScope>? configure = null) #Inserts a horizontal line paragraph into the section.
Parameters
- lineType OfficeIMO.Word.WordBorderStyle? = null
- Border style of the line.
- color OfficeIMO.OfficeColor? = null
- Line color.
- size uint = 12
- Line width.
- space uint = 1
- Line spacing.
- configure System.Action<OfficeIMO.Word.WordParagraphScope>? = null
- Configures the new item through its scope.
public WordSectionScope HyperLink(string text, Uri uri, bool addStyle = false, string tooltip = "", bool history = true, Action<WordHyperLinkScope>? configure = null) #Adds a hyperlink paragraph pointing to a URI.
Parameters
- text string
- Display text.
- uri System.Uri
- Target URI.
- addStyle bool = false
- Whether to apply hyperlink style.
- tooltip string = ""
- Optional tooltip.
- history bool = true
- Add to document history.
- configure System.Action<OfficeIMO.Word.WordHyperLinkScope>? = null
- Configures the new item through its scope.
public WordSectionScope HyperLink(string text, string anchor, bool addStyle = false, string tooltip = "", bool history = true, Action<WordHyperLinkScope>? configure = null) #Adds a hyperlink paragraph pointing to an internal anchor.
Parameters
- text string
- Display text.
- anchor string
- Bookmark anchor name.
- addStyle bool = false
- Whether to apply hyperlink style.
- tooltip string = ""
- Optional tooltip.
- history bool = true
- Add to document history.
- configure System.Action<OfficeIMO.Word.WordHyperLinkScope>? = null
- Configures the new item through its scope.
public WordSectionScope Image(string path, OfficeLength? width = null, OfficeLength? height = null, WordImageOptions? options = null, Action<WordImageScope>? configure = null) #Adds an image to the section.
Parameters
- path string
- Path to the image file to embed.
- width OfficeIMO.OfficeLength? = null
- Optional displayed image width.
- height OfficeIMO.OfficeLength? = null
- Optional displayed image height.
- options OfficeIMO.Word.WordImageOptions? = null
- Image markup, wrapping and metadata options.
- configure System.Action<OfficeIMO.Word.WordImageScope>? = null
- Configures the new item through its scope.
public WordSectionScope PageSetup(Action<WordPageSetupScope> configure) #Gets the page size, margins, orientation and running headers and footers of this section.
Parameters
- configure System.Action<OfficeIMO.Word.WordPageSetupScope>
- Configures it through its scope.
public WordSectionScope Paragraph(Action<WordParagraphScope> configure) #Adds a paragraph at the end of the section and composes it.
Parameters
- configure System.Action<OfficeIMO.Word.WordParagraphScope>
- Adds text runs and formats the paragraph.
public WordSectionScope Paragraph(WordParagraph item) #Adds an item to WordSection.Paragraphs: Provides a list of all paragraphs within the section
Parameters
- item OfficeIMO.Word.WordParagraph
- The item.
public WordSectionScope Paragraph(string text = "", Action<WordParagraphScope>? configure = null) #Adds a new paragraph containing the specified text.
Parameters
- text string = ""
- Text to place in the paragraph.
- configure System.Action<OfficeIMO.Word.WordParagraphScope>? = null
- Configures the new item through its scope.
public WordSectionScope Paragraphs(IEnumerable<WordParagraph> items) #Adds items to WordSection.Paragraphs: Provides a list of all paragraphs within the section
Parameters
- items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordParagraph>
- The items, in order.
public WordSectionScope RtlGutter(bool value = true) #Sets WordSection.RtlGutter: Gets or sets a value indicating whether the gutter should be on the right for RTL pages.
Parameters
- value bool = true
- The value; true when omitted.
public WordSectionScope Shape(WordShapeType shapeType, OfficeLength width, OfficeLength height, OfficeColor? fillColor = null, OfficeColor? strokeColor = null, OfficeLength? strokeWeight = null, double arcSize = 0.25, Action<WordShapeScope>? configure = null) #Adds a VML shape to the section.
Parameters
- shapeType OfficeIMO.Word.WordShapeType
- Type of shape to create.
- width OfficeIMO.OfficeLength
- Width or line end X.
- height OfficeIMO.OfficeLength
- Height or line end Y.
- fillColor OfficeIMO.OfficeColor? = null
- Fill color; white when omitted.
- strokeColor OfficeIMO.OfficeColor? = null
- Stroke color; black when omitted.
- strokeWeight OfficeIMO.OfficeLength? = null
- Stroke thickness; one point when omitted.
- arcSize double = 0.25
- Rounded corner size expressed as a fraction between 0 and 1.
- configure System.Action<OfficeIMO.Word.WordShapeScope>? = null
- Configures the new item through its scope.
public WordSectionScope SmartArt(WordSmartArtType type, Action<WordSmartArtScope>? configure = null) #Inserts a SmartArt diagram into this section.
Parameters
- type OfficeIMO.Word.WordSmartArtType
- Layout type of the SmartArt.
- configure System.Action<OfficeIMO.Word.WordSmartArtScope>? = null
- Configures the new item through its scope.
public WordSectionScope Table(Action<WordTableBuilder> compose) #Adds a table composed row by row at the end of the section.
Parameters
- compose System.Action<OfficeIMO.Word.WordTableBuilder>
- Sets the columns, header and rows.
public WordSectionScope Table(int rows, int columns, WordTableStyle tableStyle = TableGrid, Action<WordTableScope>? configure = null) #Adds a table to the section.
Parameters
- rows int
- Number of rows.
- columns int
- Number of columns.
- tableStyle OfficeIMO.Word.WordTableStyle = TableGrid
- Table style to apply.
- configure System.Action<OfficeIMO.Word.WordTableScope>? = null
- Configures the new item through its scope.
public WordSectionScope TextBox(string text, WordImageTextWrapping wrapTextImage = Square, Action<WordTextBoxScope>? configure = null) #Adds a text box paragraph to the section.
Parameters
- text string
- Initial text inside the text box.
- wrapTextImage OfficeIMO.Word.WordImageTextWrapping = Square
- Wrapping style.
- configure System.Action<OfficeIMO.Word.WordTextBoxScope>? = null
- Configures the new item through its scope.
public WordSectionScope Watermark(WordWatermarkStyle watermarkStyle, string textOrFilePath, OfficeLength? horizontalOffset = null, OfficeLength? verticalOffset = null, double scale = 1, Action<WordWatermarkScope>? configure = null) #Adds a watermark to the section.
Parameters
- watermarkStyle OfficeIMO.Word.WordWatermarkStyle
- Watermark style.
- textOrFilePath string
- Text or image file path.
- horizontalOffset OfficeIMO.OfficeLength? = null
- Optional signed horizontal offset.
- verticalOffset OfficeIMO.OfficeLength? = null
- Optional signed vertical offset.
- scale double = 1
- Scale factor for width and height.
- configure System.Action<OfficeIMO.Word.WordWatermarkScope>? = null
- Configures the new item through its scope.
Inherited Methods
Properties
public WordSection Model { get; } #The WordSection this scope edits, for plain C# inside a lambda.