# ConvertTo-OfficeWordDocument

Converts Word documents between supported .doc and .docx formats.

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

`None`

**Outputs**

`System.IO.FileInfo`

**Source**

[ConvertToOfficeWordDocumentCommand.cs:26](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/ConvertToOfficeWordDocumentCommand.cs#L26) 

Converts Word documents between supported .doc and .docx formats.

## Syntax

```
ConvertTo-OfficeWordDocument
[-AllowLossyLegacyConversion]
[-Force]
[-Open]
[-OutputPath] <String>
[-PassThru]
[-Path] <String>
[<CommonParameters>]
```

[#](#method-convertto-officeworddocument-switchparameter-switchparameter-switchparameter-string-switchparameter-string)

Parameter set: `All Parameter Sets`

## Description

Uses the OfficeIMO Word normal load/save conversion path, including legacy DOC diagnostics and save preflight.

## Examples

### Convert a legacy DOC file to DOCX.

```powershell
ConvertTo-OfficeWordDocument -Path .\legacy.doc -OutputPath .\converted.docx -PassThru
```

Reads the .doc file and writes a .docx file.

### Convert a DOCX file to native DOC.

```powershell
ConvertTo-OfficeWordDocument -Path .\report.docx -OutputPath .\report.doc -Force
```

Writes a supported native Word 97-2003 .doc file.

## Parameters

**-AllowLossyLegacyConversion SwitchParameter optional**

Allow conversion when a legacy DOC source contains unsupported or preserve-only content.

**-Force SwitchParameter optional**

Overwrite an existing destination file.

**-Open SwitchParameter optional**

Open the converted document after saving.

**-OutputPath String requiredposition: 1aliases: OutPath**

Destination .doc or .docx file path.

**-PassThru SwitchParameter optional**

Emit the saved file information.

**-Path String requiredposition: 0aliases: FilePath**

Source .doc or .docx file 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:6D09FBF1DAE52D1D2AAA27BD227A86177E2D4F0BA170573904FD6F2AAA5BC433 -->
