# Save-OfficeOpenDocument

Saves a native OpenDocument model with entry-level preservation diagnostics.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.OpenDocument.OdfDocument`

**Outputs**

`OfficeIMO.OpenDocument.OdfSaveResult`

**Source**

[SaveOfficeOpenDocumentCommand.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/OpenDocument/SaveOfficeOpenDocumentCommand.cs#L12) 

Saves a native OpenDocument model with entry-level preservation diagnostics.

## Syntax

```
Save-OfficeOpenDocument
-Document <OdfDocument>
[-FailOnLoss]
[-Options <OdfSaveOptions>]
[-PassThru]
[[-Path] <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-save-officeopendocument-odfdocument-switchparameter-odfsaveoptions-switchparameter-string-switchparameter-switchparameter)

Parameter set: `Document`

## Examples

### Save a live document to its associated destination.

```powershell
$document = New-OfficeOpenDocument -Path ./Proposal.odt
Save-OfficeOpenDocument -Document $document
```

## Parameters

**-Document OdfDocument requiredpipeline: True (ByValue)**

OpenDocument model to save.

**-FailOnLoss SwitchParameter optional**

Throw when source entries cannot be preserved losslessly.

**-Options OdfSaveOptions optional**

Optional package save and preservation settings.

**-PassThru SwitchParameter optional**

Emit the save result, including preservation diagnostics.

**-Path String optionalposition: 0**

Destination path; defaults to the document's associated save path.

**-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:802E65B74EACE12E8ED4D4BF92F603D1A23809AEEA20EFB4CA4F774B16C2C450 -->
