Cmdlet
Set-OfficeWordPageSetup
Sets page setup options on Word sections.
Syntax
Set-OfficeWordPageSetup
[-Columns <Int32>]
[-ColumnSeparator]
[-ColumnSpacing <OfficeLength>]
[-FooterDistance <OfficeLength>]
[-Gutter <OfficeLength>]
[-HeaderDistance <OfficeLength>]
[-Margin <OfficeLength>]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginPreset <WordMargin>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-Orientation <Portrait| Landscape>]
[-PageSize <OfficePageSize>]
[-PassThru]
[<CommonParameters>]#Parameter set:
ContextSet-OfficeWordPageSetup
[-Columns <Int32>]
[-ColumnSeparator]
[-ColumnSpacing <OfficeLength>]
[-FooterDistance <OfficeLength>]
[-Gutter <OfficeLength>]
[-HeaderDistance <OfficeLength>]
[-Margin <OfficeLength>]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginPreset <WordMargin>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-Orientation <Portrait| Landscape>]
[-PageSize <OfficePageSize>]
[-PassThru]
-Section <WordSection>
[<CommonParameters>]#Parameter set:
SectionSet-OfficeWordPageSetup
[-Columns <Int32>]
[-ColumnSeparator]
[-ColumnSpacing <OfficeLength>]
-Document <WordDocument>
[-FooterDistance <OfficeLength>]
[-Gutter <OfficeLength>]
[-HeaderDistance <OfficeLength>]
[-Index <Int32[]>]
[-Margin <OfficeLength>]
[-MarginBottom <OfficeLength>]
[-MarginLeft <OfficeLength>]
[-MarginPreset <WordMargin>]
[-MarginRight <OfficeLength>]
[-MarginTop <OfficeLength>]
[-Orientation <Portrait| Landscape>]
[-PageSize <OfficePageSize>]
[-PassThru]
[<CommonParameters>]#Parameter set:
DocumentDescription
Updates page size, orientation, margins, and section columns through OfficeIMO.Word.
Examples
Use landscape A4 with two columns.
Add-OfficeWordSection { Set-OfficeWordPageSetup -PageSize A4 -Orientation Landscape -Columns 2 }Updates the current section page setup.
Parameters
- -Columns Int32
- Number of section columns.
- -ColumnSeparator SwitchParameter
- Whether to show a separator between columns.
- -ColumnSpacing OfficeLength
- Space between columns in twips.
- FooterDistance distance in twips.
- -Gutter OfficeLength
- Gutter size in twips.
- -HeaderDistance OfficeLength
- HeaderDistance distance in twips.
- -Margin OfficeLength
- Uniform physical margin; numbers mean points.
- -MarginBottom OfficeLength
- MarginBottom margin in twips.
- -MarginLeft OfficeLength
- MarginLeft margin in twips.
- -MarginPreset WordMargin
- Built-in margin preset.
- Possible values:
Normal,Mirrored,Moderate,Narrow,Wide,Office2003Default,Unknown - -MarginRight OfficeLength
- MarginRight margin in twips.
- -MarginTop OfficeLength
- MarginTop margin in twips.
- -Orientation OfficePageOrientation
- Page orientation.
- Possible values:
Portrait,Landscape - -PageSize OfficePageSize
- Built-in page size.
- -PassThru SwitchParameter
- Emit updated sections.
- -Section WordSection
- Section to update.
- -Document WordDocument
- Document whose sections should be updated.
- -Index Int32[]
- Optional 0-based section indexes when -Document is used.
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.