Evotec

Project

PSWriteOffice

PSWriteOffice is an open-source PowerShell and .NET project with packages, release history, and technical documentation.

Stars 144
Forks 12
Open issues 16
PowerShell Gallery downloads 150,904
Release v0.2.0
Language: C# Updated: 2026-04-06

API Reference

Cmdlet

Add-OfficeWordPageNumber

Namespace PSWriteOffice
Inputs
None
Outputs
System.Object

Adds a PAGE field to the current header/footer.

Remarks

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

Examples

Authored help example

Footer page numbering.

PS>


WordFooter { Add-OfficeWordPageNumber -IncludeTotalPages }
        

Outputs “Page # of #” in the footer.

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

Add-OfficeWordPageNumber [-IncludeTotalPages] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

IncludeTotalPages SwitchParameter optionalposition: namedpipeline: False
Include “of N” when true.

Outputs

System.Object