# Save-OfficeEmail

Saves an email document as EML, EMLX, MSG, or TNEF with fidelity diagnostics.

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

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Email.EmailDocument`

**Outputs**

`OfficeIMO.Email.EmailWriteResult`

**Source**

[SaveOfficeEmailCommand.cs:17](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Email/SaveOfficeEmailCommand.cs#L17) 

Saves an email document as EML, EMLX, MSG, or TNEF with fidelity diagnostics.

## Syntax

```
Save-OfficeEmail
-Document <EmailDocument>
[-Format <EmailFileFormat>]
[-Options <EmailWriterOptions>]
[-PassThru]
[-Path] <String>
[<CommonParameters>]
```

[#](#method-save-officeemail-emaildocument-emailfileformat-emailwriteroptions-switchparameter-string)

Parameter set: `All Parameter Sets`

## Examples

### Save a message with an explicit loss policy.

```powershell
$options = New-OfficeEmailWriterOptions -ConversionLossPolicy Block
$message | Save-OfficeEmail -Path .\Message.eml -Options $options -PassThru
```

## Parameters

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

Email document to save.

**-Format EmailFileFormat optional**

Optional explicit output format. By default it is inferred from the filename.

Possible values: `Unknown`, `Eml`, `OutlookMsg`, `Tnef`, `Mbox`, `OutlookTemplate`, `Emlx`

**-Options EmailWriterOptions optional**

Optional preservation, projection, encoding, and output limits.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Path String requiredposition: 0**

Destination path.

## 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:60C8F6DC32C1326D608680B70F5A2341B207ADCBC3AAF297F4B3D2C6F83F5A8A -->
