API Reference

Cmdlet

Get-OfficeRtf

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

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

Remarks

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

Examples

Authored help example

Inspect an RTF document.

PS>


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

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

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

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

Parameters

Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
RTF file path.

Outputs

OfficeIMO.Rtf.RtfReadResult

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

Parameters

Text String requiredposition: namedpipeline: False
Raw RTF text.

Outputs

OfficeIMO.Rtf.RtfReadResult