Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Set-OfficeWordTextStyle

Aliases: WordTextStyle
Module PSWriteOffice
Aliases
WordTextStyle
Inputs
OfficeIMO.Word.WordParagraph
Outputs
OfficeIMO.Word.WordParagraph

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>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

Style text inside a Word paragraph.

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.