Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
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

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.