Click or drag to resize

HtmlToRtfMergeAndReplaceRtfFileFromFile Method

Replaces all matches of string "whatReplaceInRtf" in RTF file "rtfSourcePath" by the content of file "wherewithReplaceRtfPath".

Namespace: SautinSoft
Assembly: SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 2024.12.12
Syntax
public int MergeAndReplaceRtfFileFromFile(
	string sourcePath,
	string textToReplace,
	string wherewithReplaceRtfPath,
	string resultPath
)

Parameters

sourcePath  String
Path to source RTF file
textToReplace  String
Textual string which will be replaced by the new string "wherewithReplaceInRtf"
wherewithReplaceRtfPath  String
Path to RTF file which will be inserted into source RTF
resultPath  String
Path to new merged RTF file. A fill will be overwritten

Return Value

Int32
0 - merged successfully
1 - can't open RTF source file
2 - can't open 'wherewithReplaceRtfPath' file
3 - merging failed
4 - can't create output file, check the output path
Remarks
Creates a new RTF file "resultPath"

See Also