Click or drag to resize

HtmlToRtfMergeAndReplaceRtfFileFromString Method

Replaces all matches of the textual string "textToReplace" in RTF file "rtfSourcePath" by the RTF string "wherewithReplaceRtf".

Namespace: SautinSoft
Assembly: SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 2023.12.6
Syntax
public int MergeAndReplaceRtfFileFromString(
	string sourcePath,
	string textToReplace,
	string wherewithReplaceRtf,
	string resultPath
)

Parameters

sourcePath  String
A path to a RTF source file.
textToReplace  String
Textual string which will be replaced by the new string "wherewithReplaceInRtf"
wherewithReplaceRtf  String
String which will be inserted instead of "textToReplace"
resultPath  String
A path to a resulted RTF document. The file will be overwritten.

Return Value

Int32
0 - Replaced successfully.
1 - Can't open RTF source file.
3 - merging failed.
4 - can't create output file, check the output path.
Remarks
Creates a new RTF file. The file will be overwritten.

See Also