API Reference
Cmdlet
Set-OfficeWordPageSetup
Sets page setup options on Word sections.
Remarks
Updates page size, orientation, margins, and section columns through OfficeIMO.Word.
Examples
Use landscape A4 with two columns.
PS>
Add-OfficeWordSection { Set-OfficeWordPageSetup -PageSize A4 -Orientation Landscape -Columns 2 }
Updates the current section page setup.
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
Set-OfficeWordPageSetup [-Bottom <Nullable`1>] [-Columns <Nullable`1>] [-ColumnSeparator <Nullable`1>] [-ColumnSpacing <Nullable`1>] [-Footer <Nullable`1>] [-Gutter <Nullable`1>] [-Header <Nullable`1>] [-Left <Nullable`1>] [-Margin <Nullable`1>] [-Orientation <Portrait|Landscape>] [-PageSize <Nullable`1>] [-PassThru] [-Right <Nullable`1>] [-Top <Nullable`1>] [<CommonParameters>]#Parameter set:
CurrentParameters
- Bottom Nullable`1
- Bottom margin in twips.
- Columns Nullable`1
- Number of section columns.
- ColumnSeparator Nullable`1
- Whether to show a separator between columns.
- ColumnSpacing Nullable`1
- Space between columns in twips.
- Footer Nullable`1
- Footer distance in twips.
- Gutter Nullable`1
- Gutter size in twips.
- Header Nullable`1
- Header distance in twips.
- Left Nullable`1
- Left margin in twips.
- Margin Nullable`1
- Built-in margin preset.
- Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize Nullable`1
- Built-in page size.
- PassThru SwitchParameter
- Emit updated sections.
- Right Nullable`1
- Right margin in twips.
- Top Nullable`1
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection
Set-OfficeWordPageSetup [-Bottom <Nullable`1>] [-Columns <Nullable`1>] [-ColumnSeparator <Nullable`1>] [-ColumnSpacing <Nullable`1>] [-Footer <Nullable`1>] [-Gutter <Nullable`1>] [-Header <Nullable`1>] [-Left <Nullable`1>] [-Margin <Nullable`1>] [-Orientation <Portrait|Landscape>] [-PageSize <Nullable`1>] [-PassThru] [-Right <Nullable`1>] -Section <WordSection> [-Top <Nullable`1>] [<CommonParameters>]#Parameter set:
SectionParameters
- Bottom Nullable`1
- Bottom margin in twips.
- Columns Nullable`1
- Number of section columns.
- ColumnSeparator Nullable`1
- Whether to show a separator between columns.
- ColumnSpacing Nullable`1
- Space between columns in twips.
- Footer Nullable`1
- Footer distance in twips.
- Gutter Nullable`1
- Gutter size in twips.
- Header Nullable`1
- Header distance in twips.
- Left Nullable`1
- Left margin in twips.
- Margin Nullable`1
- Built-in margin preset.
- Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize Nullable`1
- Built-in page size.
- PassThru SwitchParameter
- Emit updated sections.
- Right Nullable`1
- Right margin in twips.
- Section WordSection
- Section to update.
- Top Nullable`1
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection
Set-OfficeWordPageSetup [-Bottom <Nullable`1>] [-Columns <Nullable`1>] [-ColumnSeparator <Nullable`1>] [-ColumnSpacing <Nullable`1>] -Document <WordDocument> [-Footer <Nullable`1>] [-Gutter <Nullable`1>] [-Header <Nullable`1>] [-Index <Int32[]>] [-Left <Nullable`1>] [-Margin <Nullable`1>] [-Orientation <Portrait|Landscape>] [-PageSize <Nullable`1>] [-PassThru] [-Right <Nullable`1>] [-Top <Nullable`1>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Bottom Nullable`1
- Bottom margin in twips.
- Columns Nullable`1
- Number of section columns.
- ColumnSeparator Nullable`1
- Whether to show a separator between columns.
- ColumnSpacing Nullable`1
- Space between columns in twips.
- Document WordDocument
- Document whose sections should be updated.
- Footer Nullable`1
- Footer distance in twips.
- Gutter Nullable`1
- Gutter size in twips.
- Header Nullable`1
- Header distance in twips.
- Index Int32[]
- Optional 0-based section indexes when -Document is used.
- Left Nullable`1
- Left margin in twips.
- Margin Nullable`1
- Built-in margin preset.
- Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize Nullable`1
- Built-in page size.
- PassThru SwitchParameter
- Emit updated sections.
- Right Nullable`1
- Right margin in twips.
- Top Nullable`1
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection