API Reference
Cmdlet
Add-OfficeWordText
Adds inline text to the current paragraph.
Remarks
Supports bold/italic/underline and color tweaks for quick DSL composition.
Examples
Example 1: Append bold text.
PS>
Add-OfficeWordParagraph { Add-OfficeWordText -Text 'Important: ' -Bold }
Writes “Important:” with bold formatting.
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
Add-OfficeWordText [-Bold] [-Color <String>] [-FontName <String>] [-FontSize <Nullable`1>] [-Italic] [-Strike] -Text <String[]> [-Underline <Nullable`1>] [<CommonParameters>]#Parameter set:
TextParameters
- Bold SwitchParameter
- Apply bold formatting.
- Color String
- Run color (#RRGGBB).
- FontName String
- Font name or family.
- FontSize Nullable`1
- Font size in points.
- Italic SwitchParameter
- Apply italic formatting.
- Strike SwitchParameter
- Render text with strikethrough.
- Text String[]
- Text segments to append.
- Underline Nullable`1
- Optional underline style.
Add-OfficeWordText [-Bold] [-Color <String>] [-FontName <String>] [-FontSize <Nullable`1>] [-Italic] -Run <Object[]> [-Strike] [-Underline <Nullable`1>] [<CommonParameters>]#Parameter set:
RunParameters
- Bold SwitchParameter
- Apply bold formatting.
- Color String
- Run color (#RRGGBB).
- FontName String
- Font name or family.
- FontSize Nullable`1
- Font size in points.
- Italic SwitchParameter
- Apply italic formatting.
- Run Object[]
- Rich text runs. Each run can be created with TextRun/WordTextRun or provided as a hashtable/object.
- Strike SwitchParameter
- Render text with strikethrough.
- Underline Nullable`1
- Optional underline style.