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: 2024.5.22
public int MergeAndReplaceRtfFileFromString(
	string sourcePath,
	string textToReplace,
	string wherewithReplaceRtf,
	string resultPath


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

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

See Also