# New-OfficeOpenDocument

Creates a native ODT, ODS, ODP, or ODG document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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 

Aliases: OfficeOpenDocument, OpenDocumentNew

**Module**

`PSWriteOffice`

**Aliases**

`OfficeOpenDocument` `OpenDocumentNew`

**Inputs**

`None`

**Outputs**

`OfficeIMO.OpenDocument.OdfDocument` `System.IO.FileInfo`

**Source**

[NewOfficeOpenDocumentCommand.cs:39](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/OpenDocument/NewOfficeOpenDocumentCommand.cs#L39) 

Creates a native ODT, ODS, ODP, or ODG document.

## Syntax

```
New-OfficeOpenDocument
[[-Content] <ScriptBlock>]
[-Kind] <Text|Spreadsheet|Presentation|Graphics>
[-NoSave]
[-PassThru]
[[-Path] <String>]
[<CommonParameters>]
```

[#](#method-new-officeopendocument-scriptblock-odfdocumentkind-switchparameter-switchparameter-string)

Parameter set: `All Parameter Sets`

## Examples

### Create an OpenDocument text report.

```powershell
New-OfficeOpenDocument -Kind Text -Path .\Report.odt -Content {
    Add-OfficeOpenDocumentHeading -Text 'Service report' -Level 1
    Add-OfficeOpenDocumentParagraph -Text 'Generated by PSWriteOffice.'
}
```

### Create an OpenDocument drawing through its native object model.

```powershell
$drawing = New-OfficeOpenDocument -Kind Graphics
$page = $drawing.AddPage('Overview')
$drawing | Save-OfficeOpenDocument -Path .\Overview.odg
```

### Create a spreadsheet with typed cells.

```powershell
New-OfficeOpenDocument -Kind Spreadsheet -Path .\Status.ods -Content {
    Add-OfficeOpenDocumentSheet -Name 'Services' -Content {
        Set-OfficeOpenDocumentCell -Row 0 -Column 0 -Value 'Service'
        Set-OfficeOpenDocumentCell -Row 0 -Column 1 -Value 'Healthy'
        Set-OfficeOpenDocumentCell -Row 1 -Column 0 -Value 'Directory'
        Set-OfficeOpenDocumentCell -Row 1 -Column 1 -Value $true
    }
}
```

## Parameters

**-Content ScriptBlock optionalposition: 2**

DSL scriptblock describing OpenDocument text, spreadsheet, or presentation content.

**-Kind OdfDocumentKind requiredposition: 0**

OpenDocument text, spreadsheet, presentation, or graphics kind.

Possible values: `Text`, `Spreadsheet`, `Presentation`, `Graphics`

**-NoSave SwitchParameter optional**

Skip saving and emit the live OpenDocument model even when -Path is supplied.

**-PassThru SwitchParameter optional**

Emit the saved file when a destination path is supplied.

**-Path String optionalposition: 1**

Optional initial 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:CD6C12885CA2393E2A297B904D7525D4138071D9B0502355AB6EC62647302EEC -->
