# Set-OfficeWordPageSetup

Sets page setup options on Word sections. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: WordPageSetup

**Module**

`PSWriteOffice`

**Aliases**

`WordPageSetup`

**Inputs**

`OfficeIMO.Word.WordDocument` `OfficeIMO.Word.WordSection`

**Outputs**

`OfficeIMO.Word.WordSection`

**Source**

[SetOfficeWordPageSetupCommand.cs:22](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/SetOfficeWordPageSetupCommand.cs#L22) 

Sets page setup options on Word sections.

## Syntax

```
Set-OfficeWordPageSetup
[-Bottom <Int32>]
[-Columns <Int32>]
[-ColumnSeparator <Boolean>]
[-ColumnSpacing <Int32>]
[-Footer <Int32>]
[-Gutter <Int32>]
[-Header <Int32>]
[-Left <Int32>]
[-Margin <WordMargin>]
[-Orientation <Portrait|Landscape>]
[-PageSize <WordPageSize>]
[-PassThru]
[-Right <Int32>]
[-Top <Int32>]
[<CommonParameters>]
```

[#](#method-set-officewordpagesetup-int32-int32-boolean-int32-int32-int32-int32-int32-wordmargin-officepageorientation-wordpagesize-switchparameter-int32-int32)

Parameter set: `Current`

```
Set-OfficeWordPageSetup
[-Bottom <Int32>]
[-Columns <Int32>]
[-ColumnSeparator <Boolean>]
[-ColumnSpacing <Int32>]
[-Footer <Int32>]
[-Gutter <Int32>]
[-Header <Int32>]
[-Left <Int32>]
[-Margin <WordMargin>]
[-Orientation <Portrait|Landscape>]
[-PageSize <WordPageSize>]
[-PassThru]
[-Right <Int32>]
-Section <WordSection>
[-Top <Int32>]
[<CommonParameters>]
```

[#](#method-set-officewordpagesetup-int32-int32-boolean-int32-int32-int32-int32-int32-wordmargin-officepageorientation-wordpagesize-switchparameter-int32-wordsection-int32)

Parameter set: `Section`

```
Set-OfficeWordPageSetup
[-Bottom <Int32>]
[-Columns <Int32>]
[-ColumnSeparator <Boolean>]
[-ColumnSpacing <Int32>]
-Document <WordDocument>
[-Footer <Int32>]
[-Gutter <Int32>]
[-Header <Int32>]
[-Index <Int32[]>]
[-Left <Int32>]
[-Margin <WordMargin>]
[-Orientation <Portrait|Landscape>]
[-PageSize <WordPageSize>]
[-PassThru]
[-Right <Int32>]
[-Top <Int32>]
[<CommonParameters>]
```

[#](#method-set-officewordpagesetup-int32-int32-boolean-int32-worddocument-int32-int32-int32-int32-int32-wordmargin-officepageorientation-wordpagesize-switchparameter-int32-int32)

Parameter set: `Document`

## Description

Updates page size, orientation, margins, and section columns through OfficeIMO.Word.

## Examples

### Use landscape A4 with two columns.

```powershell
Add-OfficeWordSection { Set-OfficeWordPageSetup -PageSize A4 -Orientation Landscape -Columns 2 }
```

Updates the current section page setup.

## Parameters

**-Bottom Int32 optional**

Bottom margin in twips.

**-Columns Int32 optional**

Number of section columns.

**-ColumnSeparator Boolean optional**

Whether to show a separator between columns.

**-ColumnSpacing Int32 optional**

Space between columns in twips.

**-Footer Int32 optional**

Footer distance in twips.

**-Gutter Int32 optional**

Gutter size in twips.

**-Header Int32 optional**

Header distance in twips.

**-Left Int32 optional**

Left margin in twips.

**-Margin WordMargin optional**

Built-in margin preset.

Possible values: `Normal`, `Mirrored`, `Moderate`, `Narrow`, `Wide`, `Office2003Default`, `Unknown`

**-Orientation OfficePageOrientation optional**

Page orientation.

Possible values: `Portrait`, `Landscape`

**-PageSize WordPageSize optional**

Built-in page size.

Possible values: `Unknown`, `Letter`, `Legal`, `Statement`, `Executive`, `A3`, `A4`, `A5`, `A6`, `B5`, `Tabloid`, `B4Jis`, `Envelope9`, `Envelope10`, `CSheet`, `EnvelopeDl`, `EnvelopeC5`, `EnvelopeC4`, `EnvelopeB5`, `EnvelopeMonarch`

**-PassThru SwitchParameter optional**

Emit updated sections.

**-Right Int32 optional**

Right margin in twips.

**-Top Int32 optional**

Top margin in twips.

**-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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:AC37563D7DAA97A95CAD4A659A9381B2303320093217C52A0AA8AA27949300E3 -->
