# Add-OfficeWordPageNumber

Adds a PAGE field to the current header/footer. 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: WordPageNumber

**Module**

`PSWriteOffice`

**Aliases**

`WordPageNumber`

**Inputs**

`None`

**Source**

[AddOfficeWordPageNumberCommand.cs:19](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/AddOfficeWordPageNumberCommand.cs#L19) 

Adds a PAGE field to the current header/footer.

## Syntax

```
Add-OfficeWordPageNumber
[-IncludeTotalPages]
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officewordpagenumber-switchparameter-switchparameter)

Parameter set: `All Parameter Sets`

## Description

Typically used inside WordFooter to render “Page X of Y”.

## Examples

### Footer page numbering.

```powershell
WordFooter { Add-OfficeWordPageNumber -IncludeTotalPages }
```

Outputs “Page # of #” in the footer.

## Parameters

**-IncludeTotalPages SwitchParameter optional**

Include “of N” when true.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

## 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:D00E8C4DA3844FD9B9FA54CD774C19DF51C6D424F1375B0C921A5C1E474B9FE6 -->
