# Add-OfficeWordEquation

Adds an Office Math equation to a Word document or paragraph.

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: WordEquation

**Module**

`PSWriteOffice`

**Aliases**

`WordEquation`

**Inputs**

`OfficeIMO.Word.WordParagraph`

**Outputs**

`OfficeIMO.Word.WordParagraph`

**Source**

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

Adds an Office Math equation to a Word document or paragraph.

## Syntax

```
Add-OfficeWordEquation
[-Document <WordDocument>]
[-Omml] <String>
[-Paragraph <WordParagraph>]
[-PassThru]
[<CommonParameters>]
```

[#](#method-add-officewordequation-worddocument-string-wordparagraph-switchparameter)

Parameter set: `All Parameter Sets`

## Description

Accepts OMML and keeps conversion/parsing outside the cmdlet.

## Examples

### Add an equation to a generated report.

```powershell
$omml = '<m:oMath xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><m:r><m:t>x+1</m:t></m:r></m:oMath>'
New-OfficeWord -Path .\Formula.docx {
    Add-OfficeWordParagraph -Text 'The following expression is stored as Office Math.'
    Add-OfficeWordEquation -Omml $omml
}
```

Inserts prebuilt OMML into the current document; conversion to OMML is intentionally outside the cmdlet.

## Parameters

**-Document WordDocument optional**

Document to receive a new equation paragraph.

**-Omml String requiredposition: 0**

Office Math Markup Language content.

**-Paragraph WordParagraph optionalpipeline: True (ByValue)**

Paragraph to receive the equation.

**-PassThru SwitchParameter optional**

Emit the equation paragraph.

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