# Add-OfficeVisioPage

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

Cmdlet 

Aliases: VisioPage

**Module**

`PSWriteOffice`

**Aliases**

`VisioPage`

**Inputs**

`OfficeIMO.Visio.VisioDocument`

**Outputs**

`OfficeIMO.Visio.VisioPage`

**Source**

[AddOfficeVisioPageCommand.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Visio/AddOfficeVisioPageCommand.cs#L23) 

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

## Syntax

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

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

Parameter set: `Document`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Automate Visio Diagrams](/docs/pswriteoffice/visio/) Guide
  
  Create, inspect, arrange, stencil, and export VSDX diagrams from PowerShell. Includes PowerShell examples, validation notes, and cmdlet links.

## Examples

### Add a second diagram page.

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

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.

**-DisplayUnit VisioMeasurementUnit optional**

Measurement unit displayed by Visio, independent of geometry input units.

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

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

Target Visio document. Optional inside New-OfficeVisio.

**-Height OfficeLength optional**

Page height.

**-Name String requiredposition: 0**

Page name.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Width OfficeLength 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).

<!-- PowerForge markdown artifact sha256:92826E4AFD629ADDEEDD7AFE7116DF7EF36F0247BC174C079F29C6D5F9F5D7D1 -->
