# Set-OfficeWordTextStyle

Updates styling on Word text. 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: WordTextStyle

**Module**

`PSWriteOffice`

**Aliases**

`WordTextStyle`

**Inputs**

`OfficeIMO.Word.WordParagraph`

**Outputs**

`OfficeIMO.Word.WordParagraph`

**Source**

[SetOfficeWordTextStyleCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Word/SetOfficeWordTextStyleCommand.cs#L18) 

Updates styling on Word text.

## Syntax

```
Set-OfficeWordTextStyle
[-Bold <Boolean>]
[-CapsStyle <Caps|SmallCaps>]
[-Color <String>]
[-DoubleStrike <Boolean>]
[-Emboss <Boolean>]
[-FontFamily <String>]
[-FontSize <Double>]
[-Highlight <WordHighlightColor>]
[[-InputObject] <WordParagraph>]
[-Italic <Boolean>]
[-Outline <Boolean>]
[-PassThru]
[-Shadow <Boolean>]
[-Spacing <Int32>]
[-Strike <Boolean>]
[-Style <WordCharacterStyles>]
[-StyleId <String>]
[-Text <String>]
[-Underline <WordUnderlineStyle>]
[<CommonParameters>]
```

[#](#member-2f3800094db50e32bf211973)

Parameter set: `All Parameter Sets`

## Examples

### Style text inside a Word paragraph.

```powershell
WordParagraph -Text 'Warning' -PassThru | Set-OfficeWordTextStyle -Bold $true -Color '#C00000'
```

Applies bold red styling to matching text.

## Parameters

**-Bold Boolean optional**

Set or clear bold formatting.

**-CapsStyle WordCapsStyle optional**

Capitalization style.

Possible values: `Caps`, `SmallCaps`

**-Color String optional**

Text color. Named colors and hexadecimal values are accepted.

**-DoubleStrike Boolean optional**

Set or clear double strikethrough.

**-Emboss Boolean optional**

Set or clear emboss effect.

**-FontFamily String optional**

Font family name.

**-FontSize Double optional**

Font size in points.

**-Highlight WordHighlightColor optional**

Highlight color.

Possible values: `Black`, `Blue`, `Cyan`, `Green`, `Magenta`, `Red`, `Yellow`, `White`, `DarkBlue`, `DarkCyan`, `DarkGreen`, `DarkMagenta`, `DarkRed`, `DarkYellow`, `DarkGray`, `LightGray`

**-InputObject WordParagraph optionalposition: 0pipeline: True (ByValue)**

Word text item to update.

**-Italic Boolean optional**

Set or clear italic formatting.

**-Outline Boolean optional**

Set or clear outline effect.

**-PassThru SwitchParameter optional**

Emit the updated text item.

**-Shadow Boolean optional**

Set or clear shadow effect.

**-Spacing Int32 optional**

Character spacing in twentieths of a point.

**-Strike Boolean optional**

Set or clear strikethrough.

**-Style WordCharacterStyles optional**

Character style to apply.

Possible values: `DefaultParagraphFont`, `Heading1Char`, `Heading2Char`, `Heading3Char`, `Heading4Char`, `Heading5Char`, `Heading6Char`, `Heading7Char`, `Heading8Char`, `Heading9Char`

**-StyleId String optional**

Character style id to apply.

**-Text String optional**

Replace the text.

**-Underline WordUnderlineStyle optional**

Underline style to apply.

Possible values: `Single`, `Words`, `Double`, `Thick`, `Dotted`, `DottedHeavy`, `Dash`, `DashedHeavy`, `DashLong`, `DashLongHeavy`, `DotDash`, `DashDotHeavy`, `DotDotDash`, `DashDotDotHeavy`, `Wave`, `WavyHeavy`, `WavyDouble`

## 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:765F34AF59A40B312F80627391AAD80AA677882CEFEAC3E89C13F942759DA1A5 -->
