Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficeWordPageSetup

Aliases: WordPageSetup
Module
PSWriteOffice
Aliases
WordPageSetup
Inputs
OfficeIMO.Word.WordDocument OfficeIMO.Word.WordSection
Outputs
OfficeIMO.Word.WordSection

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: Context
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]
-Section <WordSection>
[<CommonParameters>]
#
Parameter set: Section
Set-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: Document

Description

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 optional
Number of section columns.
-ColumnSeparator SwitchParameter optional
Whether to show a separator between columns.
-ColumnSpacing OfficeLength optional
Space between columns in twips.
-FooterDistance OfficeLength optional
FooterDistance distance in twips.
-Gutter OfficeLength optional
Gutter size in twips.
-HeaderDistance OfficeLength optional
HeaderDistance distance in twips.
-Margin OfficeLength optional
Uniform physical margin; numbers mean points.
-MarginBottom OfficeLength optional
MarginBottom margin in twips.
-MarginLeft OfficeLength optional
MarginLeft margin in twips.
-MarginPreset WordMargin optional
Built-in margin preset.
Possible values: Normal, Mirrored, Moderate, Narrow, Wide, Office2003Default, Unknown
-MarginRight OfficeLength optional
MarginRight margin in twips.
-MarginTop OfficeLength optional
MarginTop margin in twips.
-Orientation OfficePageOrientation optional
Page orientation.
Possible values: Portrait, Landscape
-PageSize OfficePageSize optional
Built-in page size.
-PassThru SwitchParameter optional
Emit updated sections.
-Section WordSection requiredpipeline: True (ByValue)sets: Section
Section to update.
-Document WordDocument requiredpipeline: True (ByValue)sets: Document
Document whose sections should be updated.
-Index Int32[] optionalsets: Document
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.