Cmdlet
Update-OfficeRtfText
Applies lossless text and metadata edits to an RTF document.
Syntax
Update-OfficeRtfText
[-AppendParagraph <String[]>]
[-CaseInsensitive]
[-DocumentProperty <IDictionary>]
[-DocumentVariable <IDictionary>]
[-NewText <String>]
[-OldText <String>]
-OutputPath <String>
[-PassThru]
[-Path] <String>
[-UserProperty <IDictionary>]
[<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Replace text in an RTF file.
New-OfficeRtf -Path .\Input.rtf -Text 'Status: Draft'
Update-OfficeRtfText -Path .\Input.rtf -OutputPath .\Output.rtf -OldText Draft -NewText Final -PassThruUses OfficeIMO.Rtf's lossless editor to update visible text while preserving untouched RTF syntax.
Parameters
- -AppendParagraph String[]
- Plain paragraphs to append to the end of the RTF document.
- -CaseInsensitive SwitchParameter
- Use ordinal case-insensitive text replacement.
- -DocumentProperty IDictionary
- Document info fields to set, such as Title, Author, Company, or Comments.
- -DocumentVariable IDictionary
- Document variables to set.
- -NewText String
- Replacement visible text.
- -OldText String
- Visible text to replace.
- -OutputPath String
- Destination RTF file path.
- -PassThru SwitchParameter
- Emit a FileInfo for chaining.
- -Path String
- Source RTF file path.
- -UserProperty IDictionary
- Custom user properties to set.
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.