API Reference
Cmdlet
Set-OfficeWordTextStyle
Updates styling on Word text.
Remarks
Updates styling on Word text.
Examples
Style text inside a Word paragraph.
PS>
WordParagraph -Text 'Warning' -PassThru | Set-OfficeWordTextStyle -Bold $true -Color '#C00000'
Applies bold red styling to matching text.
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.
Syntax
Set-OfficeWordTextStyle [-Bold <Boolean>] [-CapsStyle <Caps|SmallCaps>] [-Color <String>] [-DoubleStrike <Boolean>] [-Emboss <Boolean>] [-FontFamily <String>] [-FontSize <Int32>] [-Highlight <Black>] [-InputObject <WordParagraph>] [-Italic <Boolean>] [-Outline <Boolean>] [-PassThru] [-Shadow <Boolean>] [-Spacing <Int32>] [-Strike <Boolean>] [-Style <DefaultParagraphFont>] [-StyleId <String>] [-Text <String>] [-Underline <Single>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Bold Boolean
- Set or clear bold formatting.
- CapsStyle WordCapsStyle
- Capitalization style.
- Possible values:
Caps,SmallCaps - Color String
- Text color. Named colors and hexadecimal values are accepted.
- DoubleStrike Boolean
- Set or clear double strikethrough.
- Emboss Boolean
- Set or clear emboss effect.
- FontFamily String
- Font family name.
- FontSize Int32
- Font size in points.
- Highlight WordHighlightColor
- Highlight color.
- Possible values:
Black,Blue,Cyan,Green,Magenta,Red,Yellow,White,DarkBlue,DarkCyan,DarkGreen,DarkMagenta,DarkRed,DarkYellow,DarkGray,LightGray - InputObject WordParagraph
- Word text item to update.
- Italic Boolean
- Set or clear italic formatting.
- Outline Boolean
- Set or clear outline effect.
- PassThru SwitchParameter
- Emit the updated text item.
- Shadow Boolean
- Set or clear shadow effect.
- Spacing Int32
- Character spacing in twentieths of a point.
- Strike Boolean
- Set or clear strikethrough.
- Style WordCharacterStyles
- Character style to apply.
- Possible values:
DefaultParagraphFont,Heading1Char,Heading2Char,Heading3Char,Heading4Char,Heading5Char,Heading6Char,Heading7Char,Heading8Char,Heading9Char - StyleId String
- Character style id to apply.
- Text String
- Replace the text.
- Underline WordUnderlineStyle
- Underline style to apply.
- Possible values:
Single,Words,Double,Thick,Dotted,DottedHeavy,Dash,DashedHeavy,DashLong,DashLongHeavy,DotDash,DashDotHeavy,DotDotDash,DashDotDotHeavy,Wave,WavyHeavy,WavyDouble
Outputs
OfficeIMO.Word.WordParagraph