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 <Int32>] [-Columns <Int32>] [-ColumnSeparator <Boolean>] [-ColumnSpacing <Int32>] [-Footer <Int32>] [-Gutter <Int32>] [-Header <Int32>] [-Left <Int32>] [-Margin <Normal>] [-Orientation <Portrait|Landscape>] [-PageSize <Unknown>] [-PassThru] [-Right <Int32>] [-Top <Int32>] [<CommonParameters>]#Parameter set:
CurrentParameters
- Bottom Int32
- Bottom margin in twips.
- Columns Int32
- Number of section columns.
- ColumnSeparator Boolean
- Whether to show a separator between columns.
- ColumnSpacing Int32
- Space between columns in twips.
- Footer Int32
- Footer distance in twips.
- Gutter Int32
- Gutter size in twips.
- Header Int32
- Header distance in twips.
- Left Int32
- Left margin in twips.
- Margin WordMargin
- Built-in margin preset.
- Possible values:
Normal,Mirrored,Moderate,Narrow,Wide,Office2003Default,Unknown - Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize WordPageSize
- Built-in page size.
- Possible values:
Unknown,Letter,Legal,Statement,Executive,A3,A4,A5,A6,B5 - PassThru SwitchParameter
- Emit updated sections.
- Right Int32
- Right margin in twips.
- Top Int32
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection
Set-OfficeWordPageSetup [-Bottom <Int32>] [-Columns <Int32>] [-ColumnSeparator <Boolean>] [-ColumnSpacing <Int32>] [-Footer <Int32>] [-Gutter <Int32>] [-Header <Int32>] [-Left <Int32>] [-Margin <Normal>] [-Orientation <Portrait|Landscape>] [-PageSize <Unknown>] [-PassThru] [-Right <Int32>] -Section <WordSection> [-Top <Int32>] [<CommonParameters>]#Parameter set:
SectionParameters
- Bottom Int32
- Bottom margin in twips.
- Columns Int32
- Number of section columns.
- ColumnSeparator Boolean
- Whether to show a separator between columns.
- ColumnSpacing Int32
- Space between columns in twips.
- Footer Int32
- Footer distance in twips.
- Gutter Int32
- Gutter size in twips.
- Header Int32
- Header distance in twips.
- Left Int32
- Left margin in twips.
- Margin WordMargin
- Built-in margin preset.
- Possible values:
Normal,Mirrored,Moderate,Narrow,Wide,Office2003Default,Unknown - Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize WordPageSize
- Built-in page size.
- Possible values:
Unknown,Letter,Legal,Statement,Executive,A3,A4,A5,A6,B5 - PassThru SwitchParameter
- Emit updated sections.
- Right Int32
- Right margin in twips.
- Section WordSection
- Section to update.
- Top Int32
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection
Set-OfficeWordPageSetup [-Bottom <Int32>] [-Columns <Int32>] [-ColumnSeparator <Boolean>] [-ColumnSpacing <Int32>] -Document <WordDocument> [-Footer <Int32>] [-Gutter <Int32>] [-Header <Int32>] [-Index <Int32[]>] [-Left <Int32>] [-Margin <Normal>] [-Orientation <Portrait|Landscape>] [-PageSize <Unknown>] [-PassThru] [-Right <Int32>] [-Top <Int32>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Bottom Int32
- Bottom margin in twips.
- Columns Int32
- Number of section columns.
- ColumnSeparator Boolean
- Whether to show a separator between columns.
- ColumnSpacing Int32
- Space between columns in twips.
- Document WordDocument
- Document whose sections should be updated.
- Footer Int32
- Footer distance in twips.
- Gutter Int32
- Gutter size in twips.
- Header Int32
- Header distance in twips.
- Index Int32[]
- Optional 0-based section indexes when -Document is used.
- Left Int32
- Left margin in twips.
- Margin WordMargin
- Built-in margin preset.
- Possible values:
Normal,Mirrored,Moderate,Narrow,Wide,Office2003Default,Unknown - Orientation String
- Page orientation.
- Possible values:
Portrait,Landscape - PageSize WordPageSize
- Built-in page size.
- Possible values:
Unknown,Letter,Legal,Statement,Executive,A3,A4,A5,A6,B5 - PassThru SwitchParameter
- Emit updated sections.
- Right Int32
- Right margin in twips.
- Top Int32
- Top margin in twips.
Outputs
OfficeIMO.Word.WordSection