# Save-OfficeVisio

Saves an OfficeIMO.Visio document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Visio.VisioDocument`

**Outputs**

`OfficeIMO.Visio.VisioDocument`

**Source**

[SaveOfficeVisioCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Visio/SaveOfficeVisioCommand.cs#L18) 

Saves an OfficeIMO.Visio document.

## Syntax

```
Save-OfficeVisio
[-Document] <VisioDocument>
[-PassThru]
[[-Path] <String>]
[-Show]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-save-officevisio-visiodocument-switchparameter-string-switchparameter-switchparameter-switchparameter)

Parameter set: `Document`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Edit and Validate Visio Diagrams](/docs/visio/editing-and-validation/) Guide
  
  Load a VSDX file, find and update shapes by text or Shape Data, work with layers, and validate the result with OfficeIMO.Visio.

## Examples

### Save a loaded diagram under a new path.

```powershell
$diagram = Open-OfficeVisio -Path .\ServiceMap.vsdx
$diagram | Save-OfficeVisio -Path .\ServiceMap-copy.vsdx -PassThru
```

Saves an existing OfficeIMO.Visio document to another .vsdx file.

## Parameters

**-Document VisioDocument requiredposition: 0pipeline: True (ByValue)**

Visio document to save.

**-PassThru SwitchParameter optional**

Emit the document object for further processing.

**-Path String optionalposition: 1aliases: FilePath**

Optional save-as path.

**-Show SwitchParameter optional**

Open the document after saving.

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running 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).

<!-- PowerForge markdown artifact sha256:733A6EADC2ACB47B99C3750CB3885B834720F49E3CA4FF91D97FC8DE00B65A9C -->
