OfficeIMO

API Reference

Command

Add-OfficeWordSection

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Adds or reuses a section inside the current Word document.

Remarks

Adds or reuses a section inside the current Word document.

Examples

Create a section with a paragraph.


PS>New-OfficeWord -Path .\doc.docx { Add-OfficeWordSection { Add-OfficeWordParagraph -Text 'Hello' } }
        

Creates a document and inserts a section that contains a single paragraph.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Add-OfficeWordSection [-BreakType <Nullable`1>] [-Content <ScriptBlock>] [-PassThru] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

BreakType Nullable`1 optionalposition: namedpipeline: False
Optional section break type.
Content ScriptBlock optionalposition: 0pipeline: False
DSL scriptblock executed within the section scope.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the created WordSection.

Outputs

System.Object