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