# Get-OfficeWord

Opens an existing Word 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 **725**

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`None`

**Source**

[GetOfficeWordCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/GetOfficeWordCommand.cs#L23) 

Opens an existing Word document.

## Syntax

```
Get-OfficeWord
[[-Content] <ScriptBlock>]
[-Password <String>]
[-Path] <String>
[-ReadOnly]
[<CommonParameters>]
```

[#](#method-get-officeword-scriptblock-string-string-switchparameter)

Parameter set: `All Parameter Sets`

## Description

Returns an OfficeIMO WordDocument for inspection, advanced operations, or optional DSL edits.

## Examples

### Load a document in read-only mode.

```powershell
$doc = Get-OfficeWord -Path .\Report.docx -ReadOnly
```

Loads Report.docx and exposes the document object for querying.

### Run the Word DSL against an existing document.

```powershell
$doc = Get-OfficeWord -Path .\Report.docx { WordParagraph -Text 'Appended by DSL' }; $doc | Save-OfficeWord
```

Loads the document, appends content through the DSL, and returns the open document for saving or further edits.

## Parameters

**-Content ScriptBlock optionalposition: 1**

Optional DSL scriptblock to execute against the loaded document.

**-Password String optional**

Password used to open an encrypted document package.

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

Path to the .docx. Accepts PS paths.

**-ReadOnly SwitchParameter optional**

Open in read-only mode.

## 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:F57D6FE69C20B11793F191BFFEAB043472B0784341E3E508D948882057E466C4 -->
