# Add-OfficeVisioPage

Adds a page to a Visio document and optionally executes nested DSL content.

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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: VisioPage

**Module**

`PSWriteOffice`

**Aliases**

`VisioPage`

**Inputs**

`OfficeIMO.Visio.VisioDocument`

**Outputs**

`OfficeIMO.Visio.VisioPage`

**Source**

[AddOfficeVisioPageCommand.cs:21](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/AddOfficeVisioPageCommand.cs#L21) 

Adds a page to a Visio document and optionally executes nested DSL content.

## Syntax

```
Add-OfficeVisioPage
[[-Content] <ScriptBlock>]
[-Document <VisioDocument>]
[-Height <Double>]
[-Name] <String>
[-PassThru]
[-Unit <Inches|Centimeters|Millimeters>]
[-Width <Double>]
[<CommonParameters>]
```

[#](#method-add-officevisiopage-scriptblock-visiodocument-double-string-switchparameter-visiomeasurementunit-double)

Parameter set: `All Parameter Sets`

## Examples

### Add a second diagram page.

```powershell
OfficeVisio -Path .\Workbook.vsdx {
    VisioPage -Name 'Architecture' {
        VisioRectangle -Key api -Text 'API' -X 2 -Y 4
    }
}
```

Adds a named page and executes the nested shape DSL inside that page scope.

## Parameters

**-Content ScriptBlock optionalposition: 1**

Nested DSL content executed within this page scope.

**-Document VisioDocument optionalpipeline: True (ByValue)**

Target Visio document. Optional inside OfficeVisio.

**-Height Double optional**

Page height.

**-Name String requiredposition: 0**

Page name.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Unit VisioMeasurementUnit optional**

Measurement unit for width and height.

Possible values: `Inches`, `Centimeters`, `Millimeters`

**-Width Double optional**

Page width.

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