API Reference
Command
Add-OfficeWordSection
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 SetsParameters
- BreakType Nullable`1
- Optional section break type.
- Content ScriptBlock
- DSL scriptblock executed within the section scope.
- PassThru SwitchParameter
- Emit the created WordSection.
Outputs
System.Object