Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeRtf

Aliases: RtfOpen
Module PSWriteOffice
Aliases
RtfOpen
Inputs
System.String
Outputs
OfficeIMO.Rtf.RtfReadResult

Reads RTF into OfficeIMO's semantic and lossless syntax models.

Syntax

Get-OfficeRtf [-Path] <String> [<CommonParameters>]
#
Parameter set: Path
Get-OfficeRtf -Text <String> [<CommonParameters>]
#
Parameter set: Text

Examples

Authored help example

Inspect an RTF document.

$rtf = Get-OfficeRtf -Path .\Report.rtf
$rtf.Document.Paragraphs[0].ToPlainText()

Reads an RTF file and returns the OfficeIMO RTF read result.

Parameters

-Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path
RTF file path.
-Text String requiredsets: Text
Raw RTF 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.