# Get-OfficeDocument

Reads a supported file into the OfficeIMO shared document read result envelope.

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: Read-OfficeDocument

**Module**

`PSWriteOffice`

**Aliases**

`Read-OfficeDocument`

**Inputs**

`System.String`

**Outputs**

`OfficeIMO.Reader.OfficeDocumentReadResult` `System.String`

**Source**

[GetOfficeDocumentCommand.cs:21](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Reader/GetOfficeDocumentCommand.cs#L21) 

Reads a supported file into the OfficeIMO shared document read result envelope.

## Syntax

```
Get-OfficeDocument
[-AllStoreItems]
[-AsJson]
[-ExcelA1Range <String>]
[-ExcelChunkRows <Int32>]
[-ExcelSheetName <String>]
[-ExcludePowerPointNotes]
[-ExcludeWordFootnotes]
[-IncludePageLocations]
[-Indented]
[-MaxChars <Int32>]
[-MaxInputBytes <Int64>]
[-MaxStoreItems <Int32>]
[-MaxTableRows <Int32>]
[-NoExcelHeaders]
[-NoHashes]
[-NoMarkdownHeadingChunks]
[-OpenXmlMaxCharactersInPart <Int64>]
[-Path] <String>
[-Reader <OfficeDocumentReader>]
[<CommonParameters>]
```

[#](#member-3909709834cfb0be398c7994)

Parameter set: `All Parameter Sets`

## Description

Use -AsJson for a deterministic serialized payload suitable for indexing or API handoff.

## Examples

### Read a document envelope as JSON.

```powershell
$json = Get-OfficeDocument -Path .\Report.pdf -AsJson -Indented
$json | Set-Content -Path .\Report.reader.json
```

Reads a supported document and stores the normalized Reader result for indexing or diagnostics.

## Parameters

**-AllStoreItems SwitchParameter optional**

Project every matching item from an email store.

**-AsJson SwitchParameter optional**

Return the read result as JSON.

**-ExcelA1Range String optional**

Optional Excel A1 range to read.

**-ExcelChunkRows Int32 optional**

Excel rows per emitted worksheet chunk.

**-ExcelSheetName String optional**

Optional Excel sheet name to read.

**-ExcludePowerPointNotes SwitchParameter optional**

Exclude PowerPoint speaker notes.

**-ExcludeWordFootnotes SwitchParameter optional**

Exclude Word footnotes.

**-IncludePageLocations SwitchParameter optional**

Compute Word page locations and reconstruct RTF pages from explicit page and section breaks. PDF and logical-container formats expose their native page-like locations without this switch.

**-Indented SwitchParameter optional**

Indent JSON output.

**-MaxChars Int32 optional**

Maximum emitted chunk characters.

**-MaxInputBytes Int64 optional**

Maximum input size in bytes.

**-MaxStoreItems Int32 optional**

Maximum PST, OST, OLM, or EMLX items projected from the store. The default is 1,000.

**-MaxTableRows Int32 optional**

Maximum table rows per emitted table chunk.

**-NoExcelHeaders SwitchParameter optional**

Treat the first Excel row as data instead of headers.

**-NoHashes SwitchParameter optional**

Disable source and chunk hash computation.

**-NoMarkdownHeadingChunks SwitchParameter optional**

Do not split Markdown by headings.

**-OpenXmlMaxCharactersInPart Int64 optional**

OpenXML maximum characters per part.

**-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath**

File path to read.

**-Reader OfficeDocumentReader optional**

Optional immutable OfficeIMO reader with caller-configured handlers and processors.

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