API Reference
Cmdlet
New-OfficeRtf
Creates an RTF document with plain paragraph content.
Remarks
Creates an RTF document with plain paragraph content.
Examples
Create a small RTF file.
PS>
$file = New-OfficeRtf -Path .\Report.rtf -Text 'Summary', 'Ready for review' -PassThru
Get-OfficeRtf -Path $file.FullName
Creates an RTF document with two paragraphs and returns the file.
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
New-OfficeRtf [-NoSave] -OutputPath <String> [-PassThru] [-Text <String[]>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- NoSave SwitchParameter
- Return the OfficeIMO RTF document without saving.
- OutputPath String
- Destination path for the RTF file.
- PassThru SwitchParameter
- Emit a FileInfo for chaining.
- Text String[]
- Plain paragraph text to add to the document.
Outputs
System.IO.FileInfo OfficeIMO.Rtf.RtfDocument