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

Namespace:  SautinSoft
Assembly:  SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 5.8.2.8

Syntax

      
 C#  Visual Basic 
public int MergeAndReplaceRtfFileFromString(
	string rtfSourcePath,
	string whatReplaceInRtf,
	string wherewithReplaceRtf,
	string newMergedRtfPath
)
Public Function MergeAndReplaceRtfFileFromString ( _
	rtfSourcePath As String, _
	whatReplaceInRtf As String, _
	wherewithReplaceRtf As String, _
	newMergedRtfPath As String _
) As Integer

Parameters

rtfSourcePath
String
Path to RTF source file
whatReplaceInRtf
String
String which will be replcaed in RTF
wherewithReplaceRtf
String
String which will be inserted instead of "whatReplaceInRtf"
newMergedRtfPath
String
Path to new merged RTF file. A file will be overwritten.

Return Value

0 - merged 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 "newMergedRtfPath".



See Also