Cmdlet
Set-OfficeWordText
Updates styling on Word text.
Syntax
Set-OfficeWordText
[-Bold]
[-CapsStyle <Caps| SmallCaps>]
[-Color <OfficeColor>]
[-DoubleStrikethrough]
[-Emboss]
[-Font <String>]
[-Highlight <WordHighlightColor>]
[-Italic]
[-Outline]
[[-Paragraph] <WordParagraph>]
[-PassThru]
[-Shadow]
[-Size <OfficeLength>]
[-Spacing <Int32>]
[-Strikethrough]
[-Style <WordCharacterStyles>]
[-StyleId <String>]
[-Text <String>]
[-Underline <WordUnderlineStyle>]
[<CommonParameters>]#Parameter set:
DefaultExamples
Style text inside a Word paragraph.
WordParagraph -Text 'Warning' -PassThru | Set-OfficeWordText -Bold -Color '#C00000'Applies bold red styling to the supplied paragraph or scoped run.
Parameters
- -Bold SwitchParameter
- Set or clear bold formatting.
- -CapsStyle WordCapsStyle
- Capitalization style.
- Possible values:
Caps,SmallCaps - -Color OfficeColor
- Text color. Named colors and hexadecimal values are accepted; null clears the direct override.
- -DoubleStrikethrough SwitchParameter
- Set or clear double strikethrough.
- -Emboss SwitchParameter
- Set or clear emboss effect.
- -Font String
- Font family name.
- -Highlight WordHighlightColor
- Highlight color.
- Possible values:
Black,Blue,Cyan,Green,Magenta,Red,Yellow,White,DarkBlue,DarkCyan,DarkGreen,DarkMagenta,DarkRed,DarkYellow,DarkGray,LightGray - -Italic SwitchParameter
- Set or clear italic formatting.
- -Outline SwitchParameter
- Set or clear outline effect.
- -Paragraph WordParagraph
- Word text item to update.
- -PassThru SwitchParameter
- Emit the updated text item.
- -Shadow SwitchParameter
- Set or clear shadow effect.
- -Size OfficeLength
- Font size; bare numbers mean points. Null clears the direct size override.
- -Spacing Int32
- Character spacing in twentieths of a point.
- -Strikethrough SwitchParameter
- 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
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.