Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeRtfParagraph

Aliases: RtfParagraph
Module
PSWriteOffice
Aliases
RtfParagraph
Inputs
OfficeIMO.Rtf.RtfDocument
Outputs
OfficeIMO.Rtf.RtfDocument

Adds a paragraph to an RTF document.

Syntax

Add-OfficeRtfParagraph
[-Alignment <OfficeAlignment>]
[-Bold]
[-Color <OfficeColor>]
[-Font <String>]
[-Italic]
[-Link <Uri>]
[-PassThru]
[-Size <OfficeLength>]
[-Strikethrough]
[-Text] <String>
[-Underline <RtfUnderlineStyle>]
[<CommonParameters>]
#
Parameter set: Context
Add-OfficeRtfParagraph
[-Alignment <OfficeAlignment>]
[-Bold]
[-Color <OfficeColor>]
[-Document <RtfDocument>]
[-Font <String>]
[-Italic]
[-Link <Uri>]
[-PassThru]
[-Size <OfficeLength>]
[-Strikethrough]
[-Text] <String>
[-Underline <RtfUnderlineStyle>]
[<CommonParameters>]
#
Parameter set: Document

Examples

Use the native OfficeRtfParagraph command.

$rtf = New-OfficeRtf
Add-OfficeRtfParagraph -Document $rtf -Text 'Maintenance completed.'
Save-OfficeRtf -Document $rtf -Path .\Notes\Maintenance.rtf

Parameters

-Alignment OfficeAlignment optional
Alignment for this operation.
Possible values: Left, Center, Right, Justify, Start, End
-Bold SwitchParameter optional
Bold for this operation.
-Color OfficeColor optional
Opaque RGB text color, including CSS names and theme roles.
-Font String optional
Font family registered in the document font table.
-Italic SwitchParameter optional
Italic for this operation.
Hyperlink target written as a native RTF field.
-PassThru SwitchParameter optional
PassThru for this operation.
-Size OfficeLength optional
Font size; a number means points.
-Strikethrough SwitchParameter optional
Apply strikethrough; explicit false clears it.
-Text String requiredposition: 0
Text for this operation.
-Underline RtfUnderlineStyle optional
Native RTF underline variant.
Possible values: Single, Words, Double, Dotted, Dash, DashDot, DashDotDot, Thick, ThickDotted, ThickDash, ThickDashDot, ThickDashDotDot, Wave, HeavyWave, DoubleWave, LongDash, ThickLongDash
-Document RtfDocument optionalpipeline: True (ByValue)sets: Document
Document for this operation.

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.